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

added by JavaScript Kicks
9/4/2019 7:49:18 AM

218 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