Solving AOT Error in NgRx: Function calls are not supported in decorators

added by JavaScript Kicks
9/5/2019 8:20:49 AM

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