app.module.ts 4.3 KB

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