import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { RouterModule } from '@angular/router' ; import { LazyComponent } from "./LazyComponent" ; import { MoodRatingSvg } from "./MoodRatingSvg" ; import { SharedModule } from "./SharedModule" ; import { AuthService } from "../../../services/AuthService" ; import { CommBroker } from "../../../services/CommBroker" ; import { Consts } from "../../../Conts" ; export const LAZY_ROUTES = [ { path : ':folder' , component : LazyComponent } , { path : ':folder/:id' , component : LazyComponent } , { path : '**' , component : LazyComponent } ] ; @ NgModule ( { imports : [ SharedModule , CommonModule , RouterModule . forChild ( LAZY_ROUTES ) ] , declarations : [ LazyComponent , MoodRatingSvg ] , exports : [ LazyComponent ] , providers : [ ] } ) export class MessagesModule { constructor ( authService , private commBroker ) { console . log ( 'I am shared global AuthService ' + authService + ' ' + commBroker ) ; this . commBroker . fire ( { fromInstance : self , event : Consts . Events ( ) . LAZYLOAD_COMPLETED , context : '' , message : { } } ) ; } }