You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit method prefix a slash when none is needed #5627
In the case you have a root router config with a route with path "/...", linked to a component with his own child router config has in the following example :
With this config, pointing your browser on "/" or simply "" points to the Home route. "/login" on Login, "/whatever" on Whatever. This structure allows to put some header in the sub.html file which doesn't appears when you access the login route.
It works very well, except the part where the commit method of the RootRouter class make the emitPath object to get prefixed with a / when it's not empty. But in that case, the empty path the SubApp root already add it every time, making it appearing twice when the state is pushed in the history. This consequently makes it fail.
I fixed it by extending the if statement with a verification of the said slash at the beginning of the path. I'm creating a pull request right away.
Activity
[-]Commit method prefix a slash when none is need[/-][+]Commit method prefix a slash when none is needed[/+]angular#5627 Path prefixed with a / only when needed
fix(RootRouter): Path prefixed with a slash when not needed
csquillen commentedon Dec 19, 2015
+1
vicb commentedon Sep 24, 2016
this is related to the old router
angular-automatic-lock-bot commentedon Sep 9, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.