app.module.ts 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. import { ServicesComponent } from './servicesItems/services.component';
  2. import { ExternalPageModule } from './External-Page/external-page.module';
  3. import { InternalPageModule } from './Internal-Page/internal-page.module';
  4. import { DashBoardModule } from './dashboard/dashboard.module';
  5. import { CanDeactivateGuard } from './shared/can-deactivate-guards.service';
  6. import { HashLocationStrategy, LocationStrategy } from '@angular/common';
  7. import { FooterComponent } from './dashboard/main-footer/footer.component';
  8. import { HeaderComponent } from './dashboard/header/header.component';
  9. import { AuthGuardService } from './shared/auth-guard.service';
  10. import { ResponceInterceptService } from './shared/responce-intercept.service';
  11. import { TokenInterceptorService } from './shared/token-interceptor.service';
  12. import { BrowserModule } from '@angular/platform-browser';
  13. import { LOCALE_ID, NgModule } from '@angular/core';
  14. import { QuillModule } from 'ngx-quill';
  15. import { MomentModule } from 'ngx-moment';
  16. import {FormsModule, ReactiveFormsModule} from '@angular/forms';
  17. import { SlideMenuModule } from 'cuppa-ng2-slidemenu/cuppa-ng2-slidemenu';
  18. import { AppRoutingModule } from './app-routing.module';
  19. import { AppComponent } from './app.component';
  20. import { HttpModule } from '@angular/http';
  21. import { HttpClientModule } from '@angular/common/http';
  22. import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
  23. import { LoginComponent } from './auth-services/login/login.component';
  24. import { RegesterComponent } from './auth-services/regester/regester.component';
  25. import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
  26. import { AuthServiceService } from './shared/auth-service.service';
  27. import { HTTP_INTERCEPTORS } from '@angular/common/http';
  28. import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  29. import { ToastrModule } from 'ngx-toastr';
  30. import { NgxSpinnerModule } from 'ngx-spinner';
  31. import {NgxPaginationModule} from 'ngx-pagination';
  32. import { FiltterPipePipe } from './filtter-pipe.pipe';
  33. import { AlifeFileToBase64Module } from 'alife-file-to-base64';
  34. import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module
  35. import { FlatpickrModule } from 'angularx-flatpickr';
  36. import { CalendarModule, DateAdapter } from 'angular-calendar';
  37. import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
  38. import { BootstrapModalModule } from 'ngx-modialog/plugins/bootstrap';
  39. import { JwSocialButtonsModule } from 'jw-angular-social-buttons';
  40. import { Ng2CarouselamosModule } from 'ng2-carouselamos';
  41. import { NumberDerictiveDirective } from './number-derictive.directive';
  42. import { OnlyNumberDirective } from './shared/only-number.directive';
  43. import {SharedModule} from './shared/shared.module';
  44. import { AddRequestComponent } from './trainning-service/add-request/add-request.component';
  45. import { AllRequestsComponent } from './trainning-service/all-requests/all-requests.component';
  46. import { TrainningServicesComponent } from './trainning-service/trainning-services/trainning-services.component';
  47. import { AuthServicesModule } from './auth-services/auth-services.module';
  48. @NgModule({
  49. declarations: [
  50. AppComponent,
  51. HeaderComponent,
  52. FooterComponent,
  53. // LoginComponent,
  54. // RegesterComponent,
  55. ServicesComponent,
  56. PageNotFoundComponent,
  57. NumberDerictiveDirective,
  58. AddRequestComponent,
  59. AllRequestsComponent,
  60. TrainningServicesComponent,
  61. ],
  62. imports: [
  63. BrowserModule,
  64. FormsModule,
  65. ReactiveFormsModule,
  66. HttpModule,
  67. HttpClientModule,
  68. DashBoardModule,
  69. AuthServicesModule,
  70. InternalPageModule,
  71. ExternalPageModule,
  72. SharedModule,
  73. AppRoutingModule,
  74. SlideMenuModule,
  75. NgxSpinnerModule,
  76. NgxPaginationModule,
  77. MomentModule,
  78. AlifeFileToBase64Module,
  79. BrowserAnimationsModule, // <-- include required BrowserAnimationsModule
  80. CollapsibleModule,
  81. BootstrapModalModule,
  82. Ng2CarouselamosModule,
  83. ToastrModule.forRoot(), // ToastrModule added
  84. NgbModule.forRoot(),
  85. FlatpickrModule.forRoot(),
  86. CalendarModule.forRoot({
  87. provide: DateAdapter,
  88. useFactory: adapterFactory
  89. }),
  90. QuillModule,
  91. ],
  92. providers: [AuthServiceService,
  93. TokenInterceptorService,
  94. AuthGuardService,
  95. CanDeactivateGuard,
  96. //{ provide: LOCALE_ID, useValue: 'ar-SA' },
  97. {provide: LocationStrategy, useClass: HashLocationStrategy},
  98. ResponceInterceptService , {
  99. provide: HTTP_INTERCEPTORS,
  100. useClass: TokenInterceptorService,
  101. multi: true
  102. },
  103. ],
  104. bootstrap: [AppComponent]
  105. })
  106. export class AppModule { }