Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 1 | import { BrowserModule } from '@angular/platform-browser'; |
| 2 | import { NgModule, APP_INITIALIZER } from '@angular/core'; |
| 3 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
| 4 | import { HttpModule } from '@angular/http'; |
| 5 | import { HttpClientModule } from '@angular/common/http'; |
| 6 | |
| 7 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; |
| 8 | import { MobxAngularModule } from 'mobx-angular'; |
| 9 | |
| 10 | import { TabViewModule, DialogModule, TooltipModule } from 'primeng/primeng'; |
| 11 | import { MatButtonModule } from '@angular/material/button'; |
| 12 | import { MatIconModule } from '@angular/material/icon'; |
| 13 | import { MatDialogModule } from '@angular/material/dialog'; |
| 14 | import { ToastrModule } from 'ngx-toastr'; |
| 15 | import { NgSelectModule } from '@ng-select/ng-select'; |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame^] | 16 | import { NgxDatatableModule } from '@swimlane/ngx-datatable'; |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 17 | |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame^] | 18 | // import {SdcUiComponentsModule} from 'sdc-ui/lib/angular'; |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 19 | |
| 20 | import { AppComponent } from './app.component'; |
| 21 | import { AppRoutingModule } from './app-routing.module'; |
| 22 | import { HomeComponent } from './home/home.component'; |
| 23 | import { GeneralComponent } from './general/general.component'; |
| 24 | import { MainComponent } from './main/main.component'; |
| 25 | import { RuleFrameComponent } from './rule-frame/rule-frame.component'; |
| 26 | |
| 27 | import { HostService } from './host/host.service'; |
| 28 | import { RestApiService } from './api/rest-api.service'; |
| 29 | import { FeatherIconsPipe } from './api/feather-pipe'; |
| 30 | import { Store } from './store/store'; |
| 31 | import { LoaderComponent } from './loader/loader.component'; |
| 32 | import { ErrorDialogComponent } from './error-dialog/error-dialog.component'; |
| 33 | |
| 34 | // rule engine |
| 35 | import { TreeModule } from 'angular-tree-component'; |
| 36 | import { TargetComponent } from './rule-engine/target/target.component'; |
| 37 | import { VersionTypeSelectComponent } from './rule-engine/version-type-select/version-type-select.component'; |
| 38 | import { FromComponent } from './rule-engine/from/from.component'; |
| 39 | import { ActionComponent } from './rule-engine/action/action.component'; |
| 40 | import { ActionListComponent } from './rule-engine/action-list/action-list.component'; |
| 41 | import { ConditionComponent } from './rule-engine/condition/condition.component'; |
| 42 | import { RuleEngineApiService } from './rule-engine/api/rule-engine-api.service'; |
| 43 | import { ConfirmPopupComponent } from './rule-engine/confirm-popup/confirm-popup.component'; |
| 44 | import { SlidePanelComponent } from './rule-engine/slide-panel/slide-panel.component'; |
| 45 | import { RuleListComponent } from './rule-engine/rule-list/rule-list.component'; |
| 46 | import { BarIconsComponent } from './bar-icons/bar-icons.component'; |
| 47 | import { DiagramComponent } from './diagram/diagram.component'; |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame^] | 48 | import { SdcNotifyDialogComponent } from './sdc-notify-dialog/sdc-notify-dialog.component'; |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 49 | |
| 50 | const appInitializerFn = () => { |
| 51 | return () => { |
| 52 | console.log('app initializing'); |
| 53 | }; |
| 54 | }; |
| 55 | |
| 56 | @NgModule({ |
| 57 | declarations: [ |
| 58 | AppComponent, |
| 59 | HomeComponent, |
| 60 | GeneralComponent, |
| 61 | MainComponent, |
| 62 | RuleFrameComponent, |
| 63 | LoaderComponent, |
| 64 | FeatherIconsPipe, |
| 65 | ErrorDialogComponent, |
| 66 | TargetComponent, |
| 67 | VersionTypeSelectComponent, |
| 68 | FromComponent, |
| 69 | ActionComponent, |
| 70 | ActionListComponent, |
| 71 | ConditionComponent, |
| 72 | ConfirmPopupComponent, |
| 73 | SlidePanelComponent, |
| 74 | RuleListComponent, |
| 75 | BarIconsComponent, |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame^] | 76 | DiagramComponent, |
| 77 | SdcNotifyDialogComponent |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 78 | ], |
| 79 | imports: [ |
| 80 | BrowserModule, |
| 81 | BrowserAnimationsModule, |
| 82 | FormsModule, |
| 83 | HttpModule, |
| 84 | HttpClientModule, |
| 85 | AppRoutingModule, |
| 86 | MobxAngularModule, |
| 87 | TabViewModule, |
| 88 | DialogModule, |
| 89 | MatButtonModule, |
| 90 | MatIconModule, |
| 91 | MatDialogModule, |
| 92 | TreeModule, |
| 93 | NgSelectModule, |
| 94 | TooltipModule, |
Stone, Avi (as206k) | 548c5a2 | 2018-06-03 13:12:12 +0300 | [diff] [blame^] | 95 | ToastrModule.forRoot({ enableHtml: true }), |
| 96 | NgxDatatableModule |
Stone, Avi (as206k) | 9b2ceb3 | 2018-04-12 16:36:39 +0300 | [diff] [blame] | 97 | ], |
| 98 | entryComponents: [ConfirmPopupComponent], |
| 99 | providers: [ |
| 100 | HostService, |
| 101 | RestApiService, |
| 102 | RuleEngineApiService, |
| 103 | Store, |
| 104 | { |
| 105 | provide: APP_INITIALIZER, |
| 106 | useFactory: appInitializerFn, |
| 107 | multi: true, |
| 108 | deps: [] |
| 109 | } |
| 110 | ], |
| 111 | bootstrap: [AppComponent] |
| 112 | }) |
| 113 | export class AppModule {} |