I am using this configuration pattern in ESA, which was working up to Ember 2.9.2:
//config/environment.js
'ember-simple-auth': {
authenticationRoute: 'visitor.login',
routeAfterAuthentication: 'app',
routeIfAlreadyAuthenticated: 'app'
}
//app/router.js
Router.map(function() {
// This route is the only one with the `UnauthenticatedRouteMixin`
this.route('visitor', { path: '' }, function() {
this.route('login');
});
// This route is the only one with the `AuthenticatedRouteMixin`
this.route('app', { path: '/' }, function() {
this.route('my_account');
});
});
This used to work very well up to Ember 2.9.2, but when moving to Ember 2.10, I ended up with an Error You may not add a duplicate route named 'application'
.
Is the configuration pattern above a bad practice? How could I work around it?
Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire