vendredi 23 janvier 2015

How do we pass array property to ember components

my component looks like this..



import Ember from 'ember';

export default Ember.Component.extend({
user: undefined,
primaryAction: 'follow',
leftSubDetails: [],
rightSubDetails: [],

onInitialization: function(){
console.log('this', this);
console.log('right',this.rightSubDetails);
console.log('rightdetail', this.get('rightSubDetails'));
}.on("init")
});


And the component is called as..



{{#view-users
users=model
primaryAction='follow'
leftSubDetails=['tweets', 'followers', 'following']
rightSubDetails=['follow', 'reply', 'addList']
}}
{{/view-users}}


Looks like nothing is printed nor can i use anything in the view.. is something wrong?





Aucun commentaire:

Enregistrer un commentaire