I have several modules within my Angular2 application, that provide Services and Configuration.
Now I'd like to include the @ngrx/store
which collects the available reducers from my modules.
Here's the bootstrap code:
import {OpaqueToken} from 'angular2/core'
import {provideStore} from '@ngrx/store'
export const REDUCER_TOKEN = new OpaqueToken('Reducer');
bootstrap(AppComponent, [
provide(REDUCER_TOKEN, { useClass: Module1Reducers, multi: true }),
provide(REDUCER_TOKEN, { useClass: Module2Reducers, multi: true }),
// old code: provideStore({module1, module2}, {module1:{}, module2:[]})
provideStore(/* INSERT CODE HERE */)
]);
The INSERT CODE HERE
comment should be replaced with something, that uses all REDUCER_TOKEN
providers.
How can I achieve that?