I would like to have common routes defined in my addon, which can be shared by our multiple projects.
I saw a solution in the Ember Forum but I'm not sure if this is the right approach or If I'm doing it rigth. http://discuss.emberjs.com/t/how-to-extend-router-by-mixin-defined-in-an-addon/7553/5
addon/utils/route_setup.js:
export default function(self) {
self.route('home', {path: ''});
self.route('thanks');
};
app/router (dummy app):
import Ember from 'ember';
import config from './config/environment';
import coreMap from '../utils/route-setup';
const Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function () {
coreMap(this);
});
export default Router;
Error:
Error: Could not find module `utils/route-setup` imported from `dummy/router`