summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/app.module.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2018-08-29 17:01:32 +0300
committerIttay Stern <ittay.stern@att.com>2019-02-18 18:35:30 +0200
commit6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 (patch)
tree936005c364dc5a7264d6304d4777c3d83494db22 /vid-webpack-master/src/app/app.module.ts
parent67d99f816cc583643c35193197594cf78d8ce60a (diff)
merge from ecomp a88f0072 - Modern UI
Issue-ID: VID-378 Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/src/app/app.module.ts')
-rw-r--r--vid-webpack-master/src/app/app.module.ts74
1 files changed, 29 insertions, 45 deletions
diff --git a/vid-webpack-master/src/app/app.module.ts b/vid-webpack-master/src/app/app.module.ts
index a87ffb5b7..ce9b7da3b 100644
--- a/vid-webpack-master/src/app/app.module.ts
+++ b/vid-webpack-master/src/app/app.module.ts
@@ -1,26 +1,26 @@
-import { ApplicationRef, NgModule } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser';
-import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
-import { FormsModule, ReactiveFormsModule } from '@angular/forms';
-import { AppComponent } from './app.component';
-import { HomeComponent } from './home/home.component';
-import { ApiService } from './shared';
-import { routing } from './app.routing';
-import { createNewHosts, removeNgStyles } from '@angularclass/hmr';
-import { BrowseSdcModule } from './browseSdc/browseSdc.module';
-import { VlanTaggingModule } from './vlanTagging/vlan-tagging.module'
-import { BootstrapModalModule } from 'ng2-bootstrap-modal';
-import { HashLocationStrategy, LocationStrategy } from "@angular/common";
-import { InstantiationStatusModule } from './instantiationStatus/InstantiationStatus.module';
-import { SharedModule } from './shared/shared.module';
-import { AngularSvgIconModule } from 'angular-svg-icon';
-import { NgReduxModule } from '@angular-redux/store';
-import { StoreModule } from "./store/module";
-import { HttpInterceptorService } from './shared/utils/httpInterceptor/httpInterceptor.service';
-import { DrawingBoardModule } from './drawingBoard/drawingBoard.module';
-import { HealthStatusComponent } from './healthStatus/health-status.component';
-import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
-import { LogService } from './shared/utils/log/log.service';
+import {ApplicationRef, NgModule} from '@angular/core';
+import {BrowserModule} from '@angular/platform-browser';
+import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
+import {FormsModule, ReactiveFormsModule} from '@angular/forms';
+import {AppComponent} from './app.component';
+import {routing} from './app.routing';
+import {VlanTaggingModule} from './vlanTagging/vlan-tagging.module'
+import {BootstrapModalModule} from 'ng2-bootstrap-modal';
+import {HashLocationStrategy, LocationStrategy} from "@angular/common";
+import {InstantiationStatusModule} from './instantiationStatus/InstantiationStatus.module';
+import {SharedModule} from './shared/shared.module';
+import {AngularSvgIconModule} from 'angular-svg-icon';
+import {NgReduxModule} from '@angular-redux/store';
+import {StoreModule} from "./shared/store/module";
+import {HttpInterceptorService} from './shared/utils/httpInterceptor/httpInterceptor.service';
+import {DrawingBoardModule} from './drawingBoard/drawingBoard.module';
+import {ScrollToModule} from '@nicky-lenaers/ngx-scroll-to';
+import {LogService} from './shared/utils/log/log.service';
+import {FeatureFlagsService} from "./shared/services/featureFlag/feature-flags.service";
+import {SupportComponent} from "./support/support.component";
+import {DrawingBoardGuard} from "./drawingBoard/guards/servicePlanningGuard/drawingBoardGuard";
+import {MsoService} from "./shared/services/msoService/mso.service";
+import {HealthStatusModule} from "./healthStatus/health-status.module";
@NgModule({
imports: [
@@ -31,11 +31,10 @@ import { LogService } from './shared/utils/log/log.service';
SharedModule.forRoot(),
ScrollToModule.forRoot(),
DrawingBoardModule,
+ HealthStatusModule,
VlanTaggingModule,
InstantiationStatusModule,
- BrowseSdcModule,
BootstrapModalModule,
- BrowseSdcModule,
AngularSvgIconModule,
ReactiveFormsModule,
NgReduxModule,
@@ -43,37 +42,22 @@ import { LogService } from './shared/utils/log/log.service';
],
declarations: [
AppComponent,
- HomeComponent,
- HealthStatusComponent
+ SupportComponent,
],
providers: [
- ApiService,
LogService,
+ FeatureFlagsService,
+ DrawingBoardGuard,
+ MsoService,
{ provide: LocationStrategy, useClass: HashLocationStrategy },
{ provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, multi: true }
],
bootstrap: [AppComponent]
})
+
export class AppModule {
- private static CustomLoader: any;
constructor(public appRef: ApplicationRef) {
- //for ng2-bootstrap-modal in angualar 5
Object.defineProperty(appRef, '_rootComponents', { get: () => appRef['components'] });
}
- hmrOnInit(store) {
- console.log('HMR store', store);
- }
- hmrOnDestroy(store) {
- let cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement);
- // recreate elements
- store.disposeOldHosts = createNewHosts(cmpLocation);
- // remove styles
- removeNgStyles();
- }
- hmrAfterDestroy(store) {
- // display new elements
- store.disposeOldHosts();
- delete store.disposeOldHosts;
- }
}