338 Views
According to NgRx quick start guide, the following is code snippet of how we set up NgRx. export const counterReducer = createReducer(initialState,@NgModule({ on(increment, state => state + 1), imports: [ StoreModule.forRoot({ count: counterReducer }) ], ...})export class AppModule { } on(decrement, state => state - 1), on(reset, state => 0),); When you run ng serve, there is no problem.
0 comments