Reputation: 3536
I have the main app component and under the admin component I want to add subroutes like /admin/users, /admin/subscribers
@Component({
selector: 'my-app',
template: `<router-outlet></router-outlet>`
directives: [ROUTER_DIRECTIVES]
})
@Routes[
new Route({
path: '/admin/...',
//name: 'Admin',
component: AdminPage
})
]
And this is the configuration for the admin component
@Component({
selector: 'admin-Page',
templateUrl: applicationPath + '/adminPage.html',
directives: [ROUTER_DIRECTIVES]
})
@Routes([
new Route({
path: '/users',
component: UsersPage,
// name: 'Users',
// useAsDefault:true
}),
new Route({
path: '/subscribers',
component: SubscribersPage,
// name: 'Subscribers'
})
]
...but the problem is that the application does not recognize the route /admin/users. With the new router is this behaviour not supported any more? Does it just have a different syntax?
Upvotes: 0
Views: 87
Reputation: 657721
You don't need /...
in RC.1 router anymore to indicate there are child-routes.
Upvotes: 3