Skip to content Skip to sidebar Skip to footer

Ember Handlebars Not Automatically Putting Model In Scope

Typically, Ember automatically puts the route's model in scope when rendering a handlebars template:

{{ title }}

Renders:

My Title

For s

Solution 1:

Your controller is probably extending the controller class, when it should be extending object controller.

MeetingsShowController = Ember.ObjectController.extend ...

Rule of thumb:

No Model backed controller

FooControler = Ember.Controller.extend

Single Model backed controller

FooControler = Ember.ObjectController.extend

Collection Model backed controller

FooControler = Ember.ArrayController.extend

Post a Comment for "Ember Handlebars Not Automatically Putting Model In Scope"