-
Notifications
You must be signed in to change notification settings - Fork 93
/
Copy pathapp-routing.module.ts
101 lines (97 loc) · 2.29 KB
/
app-routing.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SingleComponent } from './examples/00-single-component';
import { NestedContainerComponent } from './examples/01-nested-component';
import { InputOutputComponent } from './examples/02-input-output';
import { FormsComponent } from './examples/03-forms';
import { MaterialFormsComponent } from './examples/04-forms-with-material';
import { ComponentWithProviderComponent } from './examples/05-component-provider';
import { WithNgRxStoreComponent } from './examples/06-with-ngrx-store';
import { WithNgRxMockStoreComponent } from './examples/07-with-ngrx-mock-store';
import { MasterComponent, DetailComponent, HiddenDetailComponent } from './examples/09-router';
export const examples = [
{
path: 'single-component',
component: SingleComponent,
data: {
name: 'Single component',
},
},
{
path: 'nested-component',
component: NestedContainerComponent,
data: {
name: 'Nested components',
},
},
{
path: 'input-output',
component: InputOutputComponent,
data: {
name: 'Input and Output',
},
},
{
path: 'forms',
component: FormsComponent,
data: {
name: 'Form',
},
},
{
path: 'forms-material',
component: MaterialFormsComponent,
data: {
name: 'Material form',
},
},
{
path: 'component-with-provider',
component: ComponentWithProviderComponent,
data: {
name: 'With provider',
},
},
{
path: 'with-ngrx-store',
component: WithNgRxStoreComponent,
data: {
name: 'With NgRx Store',
},
},
{
path: 'with-ngrx-mock-store',
component: WithNgRxMockStoreComponent,
data: {
name: 'With NgRx MockStore',
},
},
{
path: 'with-router',
component: MasterComponent,
data: {
name: 'Router',
},
children: [
{
path: 'detail/:id',
component: DetailComponent,
},
{
path: 'hidden-detail',
component: HiddenDetailComponent,
},
],
},
];
export const routes: Routes = [
{
path: '',
children: examples,
},
];
@NgModule({
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: 'legacy' })],
exports: [RouterModule],
})
export class AppRoutingModule {}