Question

Assuming that I have parent application template and in it's outlet there is users template. Now when I load users route, I want to change properties of application template too, which are outside of user's scope. How can I modify application properties from users controller??

Was it helpful?

Solution

Try using controllerFor in the setupController hook in your user route:

UserRoute = Ember.Route.extend
  setupController: (controller, model) ->
    @_super(controller, model)

    @controllerFor('application').set('foo', 'bar')

You could also check out the needs API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top