Pregunta

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??

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top