Skip to content

redirectTo doesn't work in children routes config #1461

@liuwei108

Description

@liuwei108

I have below routes configured:

const routes: Routes = [
    { path: "", redirectTo: "/home", pathMatch: "full" },
    {
        path: "home", component: HomeComponent, children: [
            { path: "", redirectTo:"body", pathMatch: "full" },
            { path: "body", component: BodyComponent}
    ] }
];

Note the line:
{ path: "", redirectTo:"body", pathMatch: "full" }
I expected the path /home will show the BodyComponent, but I can't see the content of BodyComponent it in the page.
Please check the sample in playground.

I also verify the same routes setting in a pure angular 6.0 environment, it works fine.
check the ng app

SO I believe this issue is specific to nativescript, does Nativescript don't support redirectTo in children routes?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions