]>
Commit | Line | Data |
---|---|---|
1 | import { Routes } from '@angular/router'; | |
2 | ||
3 | import { UsersComponent } from './users.component'; | |
4 | import { UserAddComponent } from './user-add'; | |
5 | import { UserListComponent } from './user-list'; | |
6 | ||
7 | export const UsersRoutes: Routes = [ | |
8 | { | |
9 | path: 'users', | |
10 | component: UsersComponent, | |
11 | children: [ | |
12 | { | |
13 | path: '', | |
14 | redirectTo: 'list', | |
15 | pathMatch: 'full' | |
16 | }, | |
17 | { | |
18 | path: 'list', | |
19 | component: UserListComponent, | |
20 | data: { | |
21 | meta: { | |
22 | titleSuffix: ' - Users list' | |
23 | } | |
24 | } | |
25 | }, | |
26 | { | |
27 | path: 'add', | |
28 | component: UserAddComponent, | |
29 | data: { | |
30 | meta: { | |
31 | titleSuffix: ' - Add a user' | |
32 | } | |
33 | } | |
34 | } | |
35 | ] | |
36 | } | |
37 | ]; |