I have a small problem with Ember.Object.create(). In my route in setupController(), I am trying to add new Ember Object to an array. Whenever I enter that route first I do controller.set('onRules',[ ]) so I have an empty array onRules to which I want to add object and then I am creating new Ember object like that:
controller.get('orRules').addObject(
Ember.Object.create(
{
id: 0,
isAllowedToDelete: false,
foo: "bar"
}
)
);
After that the object is being added to the array and when console.log orRules I can see that set and get functions are only available for id and isAllowedToDelete but not for foo. You can see it on following screenshot:
orRules class in console.log Can somebody explain me why Ember decides to make available set and get functions only for two first properties and not for foo ?
Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire