app.module.ts 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 './login/login.component';
  24. import { RegesterComponent } from './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. @NgModule({
  48. declarations: [
  49. AppComponent,
  50. HeaderComponent,
  51. FooterComponent,
  52. LoginComponent,
  53. RegesterComponent,
  54. ServicesComponent,
  55. PageNotFoundComponent,
  56. NumberDerictiveDirective,
  57. AddRequestComponent,
  58. AllRequestsComponent,
  59. TrainningServicesComponent,
  60. ],
  61. imports: [
  62. BrowserModule,
  63. FormsModule,
  64. ReactiveFormsModule,
  65. HttpModule,
  66. HttpClientModule,
  67. DashBoardModule,
  68. InternalPageModule,
  69. ExternalPageModule,
  70. SharedModule,
  71. AppRoutingModule,
  72. SlideMenuModule,
  73. NgxSpinnerModule,
  74. NgxPaginationModule,
  75. MomentModule,
  76. AlifeFileToBase64Module,
  77. BrowserAnimationsModule, // <-- include required BrowserAnimationsModule
  78. CollapsibleModule,
  79. BootstrapModalModule,
  80. Ng2CarouselamosModule,
  81. ToastrModule.forRoot(), // ToastrModule added
  82. NgbModule.forRoot(),
  83. FlatpickrModule.forRoot(),
  84. CalendarModule.forRoot({
  85. provide: DateAdapter,
  86. useFactory: adapterFactory
  87. }),
  88. QuillModule,
  89. ],
  90. providers: [AuthServiceService,
  91. TokenInterceptorService,
  92. AuthGuardService,
  93. CanDeactivateGuard,
  94. //{ provide: LOCALE_ID, useValue: 'ar-SA' },
  95. {provide: LocationStrategy, useClass: HashLocationStrategy},
  96. ResponceInterceptService , {
  97. provide: HTTP_INTERCEPTORS,
  98. useClass: TokenInterceptorService,
  99. multi: true
  100. },
  101. ],
  102. bootstrap: [AppComponent]
  103. })
  104. export class AppModule { }