greenstevester / nativescript-sidedrawer-example

Angular 2 + Nativescript SideDrawer example
7 stars 3 forks source link

router-outlet in HomeComponent reloads every time #2

Open manojdcoder opened 7 years ago

manojdcoder commented 7 years ago

router-outlet in HomeComponent reloads every time when a detail component is pushed on page-router-outlet. Any workaround on that?

Example

export const APP_ROUTES: Routes = [
    {
        path: '',
        redirectTo: '/home',
        pathMatch: 'full'
    },
    {
    path: "home",
    component: HomeComponent,
        children: [
            {path: '', component: WelcomeComponent},
            {path: "login", component: LoginComponent},
            {path: "help", component: HelpComponent},
        ]
    },
    {
    path: "detail", // pushed on page-router-outlet, makes router-outlet in home component to reload
    component: DetailComponent
    }
];