import { ModuleWithProviders , NgModule } from '@angular/core' ; import { ColorSet , colorSets , COLOR_SET_TOKEN } from './color-sets/index' ; import { ColorService } from './color.service' ; @ NgModule ( { } ) export class ColorServiceModule { param colorSet static forRoot ( colorSet ) { return { ngModule : ColorServiceModule , providers : [ { provide : COLOR_SET_TOKEN , useValue : colorSet ? colorSet : colorSets . keppel } , ColorService ] } ; } }