import { NgModule , ModuleWithProviders } from '@angular/core' ; import { NgProgressRouterConfig , NG_PROGRESS_ROUTER_CONFIG } from './ng-progress-router.interface' ; import { NgProgressRouter } from './ng-progress-router.service' ; @ NgModule ( { } ) export class NgProgressRouterModule { constructor ( ngProgressRouter ) { } static withConfig ( config ) { return { ngModule : NgProgressRouterModule , providers : [ { provide : NG_PROGRESS_ROUTER_CONFIG , useValue : config } ] } ; } }