ember@2.1.0
ember-data@2.1.0
I am passing a simple model to a component but getting the following object (I looks like the actual ember-data model is under the value property). Why is model pointing to this instead of the actual model?
Route
export default Ember.Route.extend({
model() {
return this.store.createRecord('employee');
}
})
Template
{{log model}} {{!-- logging here correctly displays the ember-data object --}}
{{my-component model=model}}
Component (my-component)
export default Ember.Component.extend({
layout,
didReceiveAttrs() {
console.log(this.attrs.model); //Prints the Object above
}
});
Aucun commentaire:
Enregistrer un commentaire