# Default mixin to all routes

**URL:** <https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471>\
**Category:** Uncategorized\
**Created:** [November 30, 2013, 5:00pm UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471 "2013-11-30T17:00:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkparso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bkparso/32/14842_2.png) [@bkparso](https://discuss.emberjs.com/u/bkparso)\
**Post date:** [November 30, 2013, 5:00pm UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471/1 "2013-11-30T17:00:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mmun](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mmun/32/14872_2.png) [@mmun](https://discuss.emberjs.com/u/mmun)\
**Post date:** [November 30, 2013, 11:40pm UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471/2 "2013-11-30T23:40:21Z")

</div>

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

JSBin: [http://emberjs.jsbin.com/ivicuvUl/1/edit](http://emberjs.jsbin.com/ivicuvUl/1/edit)

---

<div class="post-metadata">

**Author:** ![bkparso](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/bkparso/32/14842_2.png) [@bkparso](https://discuss.emberjs.com/u/bkparso)\
**Post date:** [December 1, 2013, 6:16am UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471/3 "2013-12-01T06:16:16Z")

</div>

Thank you sir - should have thought of that!

---

<div class="post-metadata">

**Author:** ![WiktorS](https://avatars.discourse-cdn.com/v4/letter/w/67e7ee/32.png) [@WiktorS](https://discuss.emberjs.com/u/WiktorS)\
**Post date:** [December 8, 2013, 3:12pm UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471/4 "2013-12-08T15:12:29Z")

</div>

App.Route is rather the way it should be done

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

[http://emberjs.jsbin.com/OsivuwIh/1/edit](http://emberjs.jsbin.com/OsivuwIh/1/edit)

---

<div class="post-metadata">

**Author:** ![jasonmit](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/jasonmit/32/182_2.png) [@jasonmit](https://discuss.emberjs.com/u/jasonmit)\
**Post date:** [December 8, 2013, 7:29pm UTC](https://discuss.emberjs.com/t/default-mixin-to-all-routes/3471/5 "2013-12-08T19:29:14Z")

</div>

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