List of Components always get the first property


#1

For better explain, I have following code (not really)

app/components/building-list.js:

import Ember from 'ember';

export default Ember.Component.extend({
  router: Ember.inject.service(),
  actions: {
    click(){
      var building = this.get('building');
      console.log(building)
    }
  }
});

app/templates/components/building-list.hbs:

<div {{action 'click'}}>

and in app/templates/buildings.hbs:

{{#each model as |building|}}
    {{#building-list building=building}}
{{/each}}

So, When I click the whatever building-list div, it always log the first building to me


#2

Sorry…, thats my problem