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