angular: [Router 3.0.0-alpha.8] redirectTo puts parentheses in URL, breaking child routes

I’m submitting a … (check one with “x”)

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior When navigating to a route that has a redirectTo, it redirects to the correct page but puts parentheses around the navigated to page, breaking all further child routes on that page.

Address bar: Address Bar URL of anchor: Anchor Link Console on clicking Anchor link leading to a child route: Console Redirect Route: Redirect Route

Expected/desired behavior The redirectTo route should redirect to the correct route without parentheses, maintaining the correct child routes and not breaking navigation.

Reproduction of the problem If the current behavior is a bug or you can illustrate your feature request better with an example, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).

Please tell us about your environment:

  • Angular version: 2.0.0-rc.3
  • Browser: all
  • Language: TypeScript 1.8

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 1
  • Comments: 16 (6 by maintainers)

Most upvoted comments

This is also present for me, with multiple redirects down to child routes that ends up with nested parentheses.

export const routes :RouterConfig = [
        {
        path: 'parent',
        component: ParentRouter,
        canActivate: [MyUserGuard],
            children: [
                {path:'', redirectTo: 'child1'},
                {path:'child1', component:Child1Router,
                    children: [
                        {path: '', redirectTo:'list',terminal:true},
                        {path: 'list', component: Child1ListPage}
                    ]
                }
            ]
        }
];

YOU are the one that has to reproduce the error in the plnkr dude, seriously. The one you posted had that issue and I fixed it, and for what you said that’s not your issue, so why in the hell did you make it… Make a plnkr reproducing your actual issue… sigh…

Here you go: http://plnkr.co/edit/FooCFQybzcTDxuKHB23x?p=preview as you can see in the console its the same type of error

So the plnkr is not reproducing your issue, but something similar…

There’s no slash on the plnkr either

seriously?.. Is that some kind of joke? http://image.prntscr.com/image/90bc379bc78245c293b75a7ddffa2847.png

your example one is incorrect

That may be because your plnkr is incorrect, sigh…

Trying to help you like for the 10th time… make a plnkr reproducing your ACTUAL issue, like the one in the image (the image it’s not a reproduction).

As you can see in my image that I posted I dont use a slash either.

I don’t use slashes and have the same issue.