当我将不推荐使用的路由器用于子路由器时,我会这样使用:
父路由器:
@Component({
selector: 'app',
directives: [RouterOutlet],
template: `
<router-outlet></router-outlet>
`
})
@RouteConfig([
{ path: '/landing/...', name: 'Landing', component: LandingComponent }
])
子路由器:
@Component({
selector: 'landing-component',
directives: [RouterOutlet],
template: `
<router-outlet></router-outlet>
`
})
@RouteConfig([
{ path: '/welcome', name: 'Welcome', component: WelcomeComponent }
])
export class LandingComponent {
}
我正在尝试切换到ngrx/路由器。我怎样才能使用ngrx/router正确地做到这一点?
谢谢