source: Farmatiko/ClientApp/src/app/app.module.ts@ d23bf72

Last change on this file since d23bf72 was 1f4846d, checked in by Mile Jankuloski <mile.jankuloski@…>, 4 years ago

Jwt token auth interceptors, services and guards

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