import { NgModule , ModuleWithProviders } from '@angular/core' ; @ NgModule ( ) export class BrowserLoggerModule { public static forRoot ( environment ) { return { ngModule : BrowserLoggerModule , providers : [ { provide : 'env' , useValue : environment } ] } ; } }