-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathapp.module.ts
66 lines (63 loc) · 1.81 KB
/
app.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
import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatListModule } from '@angular/material/list';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatToolbarModule } from '@angular/material/toolbar';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { RouterModule, Routes } from '@angular/router';
import { AppComponent } from './app.component';
import { HomeComponent } from './home';
const appRoutes: Routes = [
{ path: 'home', component: HomeComponent },
{
path: 'datetimepicker',
loadChildren: './demo-datetime/demo-datetime.module#DemoDatetimeModule'
},
{
path: 'timepicker',
loadChildren: './demo-time/demo-time.module#DemoTimeModule'
},
{
path: 'colorpicker',
loadChildren: './demo-colorpicker/demo-colorpicker.module#DemoColorpickerModule'
},
{ path: '', redirectTo: '/colorpicker', pathMatch: 'full' },
{ path: '**', redirectTo: '/colorpicker', pathMatch: 'full' }
]
@NgModule({
imports: [
RouterModule.forRoot(
appRoutes,
)
],
exports: [
RouterModule
]
})
export class AppRoutingModule { }
@NgModule({
declarations: [
AppComponent,
HomeComponent
],
imports: [
BrowserModule,
HttpClientModule,
BrowserAnimationsModule,
AppRoutingModule,
MatButtonModule,
MatSidenavModule,
MatToolbarModule,
MatIconModule,
MatListModule,
MatCardModule
],
bootstrap: [
AppComponent
]
})
export class AppModule { }