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