Chapter 7. Links and Navigation
The primary job of the router is to manage navigation between different router states. There are two ways to accomplish this: imperatively, by calling router.navigate
, or declaratively, by using the RouterLink directive.
As before, let's assume the following configuration:
[ { path: '', pathMatch: 'full', redirectTo: '/inbox' }, { path: ':folder', children: [ { path: '', component: ConversationsCmp }, { path: ':id', component: ConversationCmp, children: [ { path: 'messages', component: MessagesCmp }, { path: 'messages/:id', component: MessageCmp } ] } ] }, { path: 'compose', component: ComposeCmp, outlet: 'popup' }, ...
Get Angular Router now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.