source: Farmatiko/ClientApp/src/app/app.module.ts@ 993189e

Last change on this file since 993189e was 993189e, checked in by Mile Jankuloski <mile.jankuloski@…>, 2 years ago

Auth guards and services, refactored components

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