Render template with corresponding route/model/controller?


#1

Hiii!! I am trying to render a template using {{render “novel” model}} inside a user template and I want to use the model hook in the corresponding novel route and also be able to use the passed model in the route/template etc to use also in action helpers since I have a separate backend API endpoint to each, how should I do it?

Any advice to point me in the right direction would be much appreciated… Thanks!


#2

{{render}} has kind of been deprecated. Views have been formally deprecated in Ember 2.x and controllers are soon to be deprecated. Though they will likely still be around until Ember 3.x.

Instead of trying to use {{render}} I recommend you build an Ember.Component.

Are you using Ember-CLI? Can you tell me more about your “novel” view/controller/model, I’d be happy to cook you up a basic example.