Default mixin to all routes

Hi everyone!

Is there a way to automatically mix in (a mixin) to all routes - even those generated by Ember?

I’d imagine if it was possible it would be possible somehow in an initializer, but I really have no idea.

Any help would be appreciated.

You can reopen Ember.Route: Ember.Route.reopen(App.YourMixin).


1 Like

Thank you sir - should have thought of that!

App.Route is rather the way it should be done

If App.Route exists it is automatically used to create routes

Partially agree with App.Route approach but this approach does not cover generated routes.