-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Override AccountsTemplates.configureRoute #19
Comments
I've managed to do this little "cleanup" before configuring my own route. Quite ugly IMO |
the thing is that the first call to |
Nope. Deleting the key on that object gives you the option to "overwrite" an already set route. |
In case we're sure it's not a problem to configure the same route twice with flow-router, we can avoid checking whether the route is already set up (i.e. we could remove these lines). @arunoda, do you think it would be a problem doing something like the following? FlowRouter.route('/one/path', {
name: 'myRoute',
// Other options here...
});
FlowRouter.route('/another/path', {
name: 'myRoute', // same name as above!
// Other different options here...
}); which is trying to change options (including path...) for a named route already defined. |
It won't be an issue for the route name. But configuring the same route definition twice will be problematic. |
@arunoda is there any way to undo or cancel a route definition so that a new call to Edit: alternatively, is there any way to change the options for an already defined route? |
Thanks for the hack @raduchiriac, I ran into the same thing with telescope. Im interested to know if theres a superior solution. |
Any updates on this? @raduchiriac 's hack did not work for me when trying to set a different layout for the |
I have the same issue, can't set a different layout to the signIn route. Any updates please? @raduchiriac |
@raduchiriac |
It's not a solution but a work-around. delete AccountsTemplates.routes.signUp;
AccountsTemplates.configureRoute('signUp', {
name: 'signUp',
path: '/sign-up',
template: 'register'
}); |
I am using a TelescopeApp (v0.25.5) and I need to edit the route paths and templates for "sign-in" and "sign-up". These are already declared under
/telescope-users/lib/config.js
When I do:
I get an error saying:
Route already configured!
Is there a way I can override a previously (from the packages) declared route?
The text was updated successfully, but these errors were encountered: