import { StoreModule } from "@ngrx/store";
import { currentPurchase } from "../shared/index";
@NgModule({
imports: [
IonicModule.forRoot(MyApp, {}),
HttpModule,
StoreModule.provideStore({currentPurchase})
]
..
I am getting Property currentPurchase' does not exist on type typeof app.module.
The imported reducer looks like this:
import { ActionReducer, Action } from "@ngrx/store";
import { ActionType } from "./action-type";
import { PurchaseModel } from "../purchase/purchase.model";
export const currentPurchase: ActionReducer<PurchaseModel> = (state:PurchaseModel = new PurchaseModel(), action:Action) => {
switch (action.type) {
case ActionType.SET_PURCHASE:
return (action.payload !== null) ? action.payload : new PurchaseModel();
case ActionType.UPDATE_PURCHASE:
return Object.assign({}, state, action.payload);
default:
return state;
}
};
Also:
Any help is appreciated.