Question about the Ember method modelFor
My attempts to use this in a component have failed:
//info component
model(params){
return this.store.createRecord('info');
},
user: this.modelFor('user'),
this code breaks the entire app with the following error:
ember.debug.js:4875 Uncaught TypeError: this.modelFor is not a function
I find myself often wanting to use methods in components, or wanting to access multiple models in my component logic -- does anyone know a good resource to educate myself on these best practices?
Thanks!
In your component you can pass the model or multiple models.
RépondreSupprimer{{my-component model=model model2=model2}}
In your component you can pass the model or multiple models.
RépondreSupprimer{{my-component model=model model2=model2}}