We can now build out the scalable ngrx structure into our various feature modules, which will provide state. Starting with MixerModule, let's modify app/modules/mixer/mixer.module.ts with the following:
...// libsimport { StoreModule } from '@ngrx/store';...@NgModule({ imports: [ PlayerModule, SharedModule, NativeScriptRouterModule.forChild(routes), StoreModule.forFeature('mixerModule', { mixer: {} // TODO: add reducer when ready }) ], ...})export class MixerModule { }
Here, we are defining what the MixerModule state will provide. Now, let's define its shape; create app/modules/mixer/states/mixer.state.ts:
import { IComposition } from '../../shared/models';export interface IMixerState { compositions?: ...