diff --git a/docs/store/api.md b/docs/store/api.md index 9143cedbfe..217440bd6b 100644 --- a/docs/store/api.md +++ b/docs/store/api.md @@ -158,3 +158,27 @@ export const reducers: ActionReducerMap = { }) export class FeatureModule { } ``` + +To inject meta reducers, use the `META_REDUCERS` injection token exported in +the Store API and a `Provider` to register the meta reducers through dependency +injection. + +``` +import { MetaReducer, META_REDUCERS } '@ngrx/store'; +import { SomeService } from './some.service'; + +export function getMetaReducers(some: SomeService): MetaReducer[] { + // return array of meta reducers; +} + +@NgModule({ + providers: [ + { + provide: META_REDUCERS, + deps: [SomeService], + useFactory: getMetaReducers + } + ] +}) +export class AppModule {} +```