-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.module.ts
More file actions
45 lines (42 loc) · 1.14 KB
/
Copy pathapp.module.ts
File metadata and controls
45 lines (42 loc) · 1.14 KB
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
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {FormsModule} from "@angular/forms";
import {CourseListComponent} from "./components/courses/course-list.component";
import {StarComponent} from './components/star/star.component';
import {ReplacePipe} from './components/pipe/replace.pipe';
import {NavBarComponent} from './components/nav-bar/nav-bar.component';
import {RouterModule} from "@angular/router";
import { NotFoundComponent } from './components/not-found/not-found.component';
@NgModule({
declarations: [
AppComponent,
CourseListComponent,
StarComponent,
ReplacePipe,
NavBarComponent,
NotFoundComponent
],
imports: [
BrowserModule,
FormsModule,
RouterModule.forRoot([
{
path: '',
redirectTo: 'courses', pathMatch: 'full'
},
{
path: 'courses',
component: CourseListComponent, pathMatch: 'full'
},
{
path: '**',
component: NotFoundComponent
}
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}