forked from cloud-blitz/angular-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.module.ts
More file actions
33 lines (30 loc) · 1019 Bytes
/
Copy pathapp.module.ts
File metadata and controls
33 lines (30 loc) · 1019 Bytes
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
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule, Routes } from '@angular/router'
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { ListWorkersComponent } from './components/list-workers/list-workers.component';
import { AddWorkerComponent } from './components/add-worker/add-worker.component';
const routes: Routes = [
{path: 'workers', component: ListWorkersComponent},
{path: 'addworker', component: AddWorkerComponent},
{path: 'editworker/:id', component: AddWorkerComponent},
{path: '', redirectTo: '/workers', pathMatch: 'full'}
];
@NgModule({
declarations: [
AppComponent,
ListWorkersComponent,
AddWorkerComponent
],
imports: [
BrowserModule,
HttpClientModule,
FormsModule,
RouterModule.forRoot(routes)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }