Reputation: 3737
I have a ember route as follows which uses deactivate function to set some properties when route deactivation.
export default Ember.Route.extend({
deactivate: function() {
this._super();
this.set('scrollSelector',mainContainer);
// need to set property here and use it inside controller
}
});
How can I set property inside deactivate
method to be used inside controller
level. ?
Appreciate any help.
Upvotes: 0
Views: 127
Reputation: 12872
You can try using this.controller
this.controller.set('propertyname','value');
You can even try this.controllerFor(this.routeName);
to get controller object
Upvotes: 1