app.module.ts 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. import { FooterComponent } from './dashboard/main-footer/footer.component';
  2. import { HeaderComponent } from './dashboard/header/header.component';
  3. import { MainMenuService } from './shared/main-menu.service';
  4. import { InternalSerService } from './shared/internal-ser.service';
  5. import { FooterService } from './shared/footer.service';
  6. import { NewService } from './shared/new.service';
  7. import { AchievementsService } from './shared/achievements.service';
  8. import { ExternalSerService } from './shared/external-ser.service';
  9. import { EventService } from './shared/event.service';
  10. import { HospitalService } from './shared/hospital.service';
  11. import { ReportService } from './shared/report.service';
  12. import { SectionService } from './shared/section.service';
  13. import { HashLocationStrategy, LocationStrategy } from '@angular/common';
  14. import { DepartmentService } from './shared/department.service';
  15. import { DepartmentListComponent } from './dashboard/department/department-list/department-list.component';
  16. import { AuthGuardService } from './shared/auth-guard.service';
  17. import { UserService } from './shared/user.service';
  18. import { ResponceInterceptService } from './shared/responce-intercept.service';
  19. import { TokenInterceptorService } from './shared/token-interceptor.service';
  20. import { BrowserModule } from '@angular/platform-browser';
  21. import { registerLocaleData } from '@angular/common';
  22. import localeFr from '@angular/common/locales/ar';
  23. import { NgModule} from '@angular/core';
  24. import { QuillModule } from 'ngx-quill';
  25. import { MomentModule } from 'ngx-moment';
  26. import {FormsModule, ReactiveFormsModule} from '@angular/forms';
  27. import { SlideMenuModule } from 'cuppa-ng2-slidemenu/cuppa-ng2-slidemenu';
  28. import { AppRoutingModule } from './app-routing.module';
  29. import { AppComponent } from './app.component';
  30. import { HttpModule } from '@angular/http';
  31. import { HttpClientModule } from '@angular/common/http';
  32. import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
  33. import { LoginComponent } from './login/login.component';
  34. import { RegesterComponent } from './regester/regester.component';
  35. import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
  36. import { AuthServiceService } from './shared/auth-service.service';
  37. import { HTTP_INTERCEPTORS } from '@angular/common/http';
  38. import { DashboardComponent } from './dashboard/dashboard/dashboard.component';
  39. import { ServiceItemComponent } from './dashboard/service-item/service-item.component';
  40. import { UsersComponent } from './dashboard/users/users.component';
  41. import { FormUserComponent } from './dashboard/users/form-user/form-user.component';
  42. import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  43. import { ToastrModule } from 'ngx-toastr';
  44. import { NgxSpinnerModule } from 'ngx-spinner';
  45. import {NgxPaginationModule} from 'ngx-pagination';
  46. import { FiltterPipePipe } from './filtter-pipe.pipe';
  47. import { RolesService } from './shared/roles.service';
  48. import { RolesListComponent } from './dashboard/roles/roles-list/roles-list.component';
  49. import { AddRolesComponent } from './dashboard/roles/add-roles/add-roles.component';
  50. import { AddDepartmentComponent } from './dashboard/department/add-department/add-department.component';
  51. import { SectionListComponent } from './dashboard/sections/section-list/section-list.component';
  52. import { AddSectionComponent } from './dashboard/sections/add-section/add-section.component';
  53. import { UserPermissionComponent } from './dashboard/users/user-permission/user-permission.component';
  54. import { AlifeFileToBase64Module } from 'alife-file-to-base64';
  55. import { UserReportComponent } from './dashboard/users/user-report/user-report.component';
  56. import { RoleReportComponent } from './dashboard/roles/role-report/role-report.component';
  57. import { RoleReport2Component } from './dashboard/roles/role-report2/role-report2.component';
  58. import { ReportsPageComponent } from './dashboard/reports-page/reports-page.component';
  59. import { ReportListComponent } from './dashboard/report-list/report-list.component';
  60. import { EnglishCharactersDirective } from './shared/english-characters.directive';
  61. import { OnlyNumberDirective } from './shared/only-number.directive';
  62. import { HospitalListComponent } from './dashboard/hospitals/hospital-list/hospital-list.component';
  63. import { AddHospitalComponent } from './dashboard/hospitals/add-hospital/add-hospital.component';
  64. import { EventsComponent } from './dashboard/events/events.component';
  65. import { AddEventComponent } from './dashboard/events/add-event/add-event.component';
  66. import { ExternalListComponent } from './dashboard/external-services/external-list/external-list.component';
  67. import { AddExternalComponent } from './dashboard/external-services/add-external/add-external.component';
  68. import { AchievementComponent } from './dashboard/achievements/achievement-list/achievement.component';
  69. import { AddAchievementComponent } from './dashboard/achievements/add-achievement/add-achievement.component';
  70. import { TabListComponent } from './dashboard/tabs/tab-list/tab-list.component';
  71. import { AddTabComponent } from './dashboard/tabs/add-tab/add-tab.component';
  72. import { NewsListComponent } from './dashboard/news/news-list/news-list.component';
  73. import { AddNewsComponent } from './dashboard/news/add-news/add-news.component';
  74. import { FooterListComponent } from './dashboard/footer/footer-list/footer-list.component';
  75. import { AddFooterComponent } from './dashboard/footer/add-footer/add-footer.component';
  76. import { InternalServicesComponent } from './dashboard/internal-services/internal-services.component';
  77. import { AddInternalServicesComponent } from './dashboard/internal-services/add-internal-services/add-internal-services.component';
  78. import { LecturesListComponent } from './dashboard/lectures/lectures-list/lectures-list.component';
  79. import { AddLectureComponent } from './dashboard/lectures/add-lecture/add-lecture.component';
  80. import { MainListComponent } from './dashboard/main-menu/main-list/main-list.component';
  81. import { AddMenuComponent } from './dashboard/main-menu/add-menu/add-menu.component';
  82. import { DashboardContent } from './dashboard/dashboard-content';
  83. import { AddJoinUsComponent } from './dashboard/add-join-us/add-join-us.component';
  84. import { InternalPageModule } from './Internal-Page/internal-page.module';
  85. import { CollapsibleModule } from 'angular2-collapsible'; // <-- import the module
  86. import { FlatpickrModule } from 'angularx-flatpickr';
  87. import { CalendarModule, DateAdapter } from 'angular-calendar';
  88. import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
  89. import { ShortenPipe } from './shorten.pipe';
  90. @NgModule({
  91. declarations: [
  92. AppComponent,
  93. HeaderComponent,
  94. FooterComponent,
  95. LoginComponent,
  96. RegesterComponent,
  97. PageNotFoundComponent,
  98. DashboardComponent,
  99. DashboardContent,
  100. ServiceItemComponent,
  101. ServiceItemComponent,
  102. UsersComponent,
  103. FormUserComponent,
  104. FiltterPipePipe,
  105. RolesListComponent,
  106. AddRolesComponent,
  107. DepartmentListComponent,
  108. AddDepartmentComponent,
  109. SectionListComponent,
  110. AddSectionComponent,
  111. UserPermissionComponent,
  112. UserReportComponent,
  113. RoleReportComponent,
  114. RoleReport2Component,
  115. ReportsPageComponent,
  116. ReportListComponent,
  117. EnglishCharactersDirective,
  118. OnlyNumberDirective,
  119. HospitalListComponent,
  120. AddHospitalComponent,
  121. EventsComponent,
  122. AddEventComponent,
  123. ExternalListComponent,
  124. AddExternalComponent,
  125. AchievementComponent,
  126. AddAchievementComponent,
  127. TabListComponent,
  128. AddTabComponent,
  129. NewsListComponent,
  130. AddNewsComponent,
  131. FooterListComponent,
  132. AddFooterComponent,
  133. InternalServicesComponent,
  134. AddInternalServicesComponent,
  135. LecturesListComponent,
  136. AddLectureComponent,
  137. MainListComponent,
  138. AddMenuComponent,
  139. AddJoinUsComponent,
  140. ShortenPipe,
  141. ],
  142. imports: [
  143. BrowserModule,
  144. FormsModule,
  145. ReactiveFormsModule,
  146. HttpModule,
  147. HttpClientModule,
  148. InternalPageModule,
  149. AppRoutingModule,
  150. SlideMenuModule,
  151. NgxSpinnerModule,
  152. NgxPaginationModule,
  153. MomentModule,
  154. AlifeFileToBase64Module,
  155. BrowserAnimationsModule, // <-- include required BrowserAnimationsModule
  156. CollapsibleModule,
  157. ToastrModule.forRoot(), // ToastrModule added
  158. NgbModule.forRoot(),
  159. FlatpickrModule.forRoot(),
  160. CalendarModule.forRoot({
  161. provide: DateAdapter,
  162. useFactory: adapterFactory
  163. }),
  164. QuillModule,
  165. ],
  166. providers: [AuthServiceService,
  167. TokenInterceptorService,
  168. UserService,
  169. AuthGuardService,
  170. RolesService,
  171. SectionService,
  172. DepartmentService,
  173. ReportService,
  174. HospitalService,
  175. EventService,
  176. NewService,
  177. FooterService,
  178. MainMenuService,
  179. ExternalSerService,
  180. AchievementsService,
  181. InternalSerService,
  182. {provide: LocationStrategy, useClass: HashLocationStrategy},
  183. ResponceInterceptService , {
  184. provide: HTTP_INTERCEPTORS,
  185. useClass: TokenInterceptorService,
  186. multi: true
  187. },
  188. ],
  189. bootstrap: [AppComponent]
  190. })
  191. export class AppModule { }