1 | import { BrowserModule } from '@angular/platform-browser';
|
---|
2 | import { NgModule } from '@angular/core';
|
---|
3 | import { FormsModule } from '@angular/forms';
|
---|
4 | import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
---|
5 | import { RouterModule } from '@angular/router';
|
---|
6 | import { MaterialModule } from './shared/material.module';
|
---|
7 | import { ReactiveFormsModule } from '@angular/forms';
|
---|
8 |
|
---|
9 | import { CoreModule } from './shared/core.module';
|
---|
10 |
|
---|
11 | import { AuthGuard } from './shared/guards/auth.guard';
|
---|
12 | import { DataService } from './shared/data.service';
|
---|
13 | import { AppComponent } from './app.component';
|
---|
14 | import { NavMenuComponent } from './nav-menu/nav-menu.component';
|
---|
15 | import { HomeComponent } from './home/home.component';
|
---|
16 | import { CounterComponent } from './counter/counter.component';
|
---|
17 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
---|
18 | import { KoronaComponent } from './korona/korona.component';
|
---|
19 | import { AdminComponent } from './admin/admin.component';
|
---|
20 | import { DashboardComponent } from './dashboard/dashboard.component';
|
---|
21 | import { LoginComponent } from './login/login.component';
|
---|
22 | import { MedicineDialogComponent } from './dialogs/medicine-dialog/medicine-dialog.component';
|
---|
23 | import { PharmacyDialogComponent } from './dialogs/pharmacy-dialog/pharmacy-dialog.component';
|
---|
24 | import { FacilityDialogComponent } from './dialogs/facility-dialog/facility-dialog.component';
|
---|
25 | import { WorkerDialogComponent } from './dialogs/worker-dialog/worker-dialog.component';
|
---|
26 | import { EditPharmacyDialogComponent } from './dialogs/edit-pharmacy-dialog/edit-pharmacy-dialog.component';
|
---|
27 | import { EditPharmacyHeadDialogComponent } from './dialogs/edit-pharmacy-head-dialog/edit-pharmacy-head-dialog.component';
|
---|
28 | import { PharmacyHeadDialogComponent } from './dialogs/pharmacy-head-dialog/pharmacy-head-dialog.component';
|
---|
29 | import { AddMedicineDialogComponent } from './dialogs/add-medicine-dialog/add-medicine-dialog.component';
|
---|
30 | import { ListMedicinesDialogComponent } from './dialogs/list-medicines-dialog/list-medicines-dialog.component';
|
---|
31 |
|
---|
32 | @NgModule({
|
---|
33 | declarations: [
|
---|
34 | AppComponent,
|
---|
35 | NavMenuComponent,
|
---|
36 | HomeComponent,
|
---|
37 | CounterComponent,
|
---|
38 | KoronaComponent,
|
---|
39 | AdminComponent,
|
---|
40 | DashboardComponent,
|
---|
41 | LoginComponent,
|
---|
42 | MedicineDialogComponent,
|
---|
43 | PharmacyDialogComponent,
|
---|
44 | FacilityDialogComponent,
|
---|
45 | WorkerDialogComponent,
|
---|
46 | EditPharmacyDialogComponent,
|
---|
47 | EditPharmacyHeadDialogComponent,
|
---|
48 | PharmacyHeadDialogComponent,
|
---|
49 | AddMedicineDialogComponent,
|
---|
50 | ListMedicinesDialogComponent
|
---|
51 | ],
|
---|
52 | imports: [
|
---|
53 | BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
|
---|
54 | HttpClientModule,
|
---|
55 | FormsModule,
|
---|
56 | RouterModule.forRoot([
|
---|
57 | { path: '', component: HomeComponent, pathMatch: 'full' },
|
---|
58 | { path: 'mapa', component: CounterComponent },
|
---|
59 | { path: 'koronavirus', component: KoronaComponent },
|
---|
60 | { path: 'admin', component: AdminComponent, canActivate: [AuthGuard] },
|
---|
61 | { path: 'dashboard', component: DashboardComponent, canActivate: [AuthGuard] },
|
---|
62 | { path: 'login', component: LoginComponent }
|
---|
63 | ]),
|
---|
64 | BrowserAnimationsModule,
|
---|
65 | MaterialModule,
|
---|
66 | ReactiveFormsModule,
|
---|
67 | CoreModule
|
---|
68 | ],
|
---|
69 | providers: [
|
---|
70 | DataService
|
---|
71 | ],
|
---|
72 | bootstrap: [AppComponent]
|
---|
73 | })
|
---|
74 | export class AppModule { }
|
---|