import { CommonModule } from '@angular/common' ; import { HTTP_INTERCEPTORS } from '@angular/common/http' ; import { ModuleWithProviders , NgModule } from '@angular/core' ; import { EffectsModule } from '@ngrx/effects' ; import { StoreModule } from '@ngrx/store' ; import { StandardHeaderInterceptor } from './interceptors' ; import { CoreStoreFacade } from './store/core-store.facade' ; import { effects } from './store/effects' ; import { reducers } from './store/reducers' ; @ NgModule ( { imports : [ CommonModule , StoreModule . forFeature ( 'core' , reducers ) , EffectsModule . forFeature ( effects ) ] } ) export class CoreModule { static forRoot ( ) { return { ngModule : CoreModule , providers : [ { provide : HTTP_INTERCEPTORS , useClass : StandardHeaderInterceptor , multi : true } ] } ; } constructor ( private facade ) { this . facade . establishSignalRConnection ( ) ; } }