diff --git a/app/assets/javascripts/discourse/routes/application_route.js b/app/assets/javascripts/discourse/routes/application_route.js index 68eb310921b..be96c9ca831 100644 --- a/app/assets/javascripts/discourse/routes/application_route.js +++ b/app/assets/javascripts/discourse/routes/application_route.js @@ -80,8 +80,16 @@ Discourse.ApplicationRoute = Em.Route.extend({ }); } - } + }, + }, + activate: function() { + this._super(); + Em.run.next(function() { + // Support for callbacks once the application has activated + Discourse.ApplicationRoute.trigger('activate'); + }); } - }); + +RSVP.EventTarget.mixin(Discourse.ApplicationRoute);