Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // src/app/store/combine.ts
- // Exported via src/app/store/index.ts
- import * as fromFood from './food';
- import {createSelector} from '@ngrx/store';
- import {FoodEffects} from './food/effects/food.effects';
- /**
- * Make a map of states
- */
- export interface State {
- food: fromFood.State
- }
- /**
- * Make a map of reducers
- */
- export const reducers = {
- food: fromFood.reducer
- };
- /**
- * Export selectors
- */
- export const getFood = (state: State) => state.food;
- export const getFoods = createSelector(getFood, fromFood.getFoods);
- /**
- * Export effects
- */
- export const rootEffects = [FoodEffects];
Add Comment
Please, Sign In to add comment