I'm getting this error trying to import a custom module
zone.js:269 Uncaught Error: Unexpected value '[object Object]' imported by the module 'AppModule'
this is my app.module.ts
const SELFBITSCONFIG = {...}
@NgModule({
imports: [
...
SelfbitsAngularModule.forRoot(SELFBITSCONFIG)
]
})
this is the external file i'm trying to import
@NgModule({
providers:SELFBITS_PROVIDERS,
imports:[HttpModule]
})
export class SelfbitsAngularModule{
static forRoot(config:SelfbitsAppConfig):ModuleWithProviders{
return {
ngModule:SelfbitsAngularModule,
providers:[
{ provide: SELFBITS_CONFIG, useValue: config }
]
}
}
}
I'm using angular 2 starter webpack by Angular Class, currently running "webpack": "2.1.0-beta.22"