member_webapp/src/packages/target/store/index.ts

31 lines
708 B
TypeScript
Raw Normal View History

2018-04-06 11:02:18 +00:00
import {
createSelector,
createFeatureSelector,
ActionReducerMap,
} from '@ngrx/store';
import { StateSelector } from 'packages/core/ngrx/store';
import { MODULE } from '../target.constant';
import * as TargetStore from './target';
export interface State {
readallbydomain: TargetStore.State;
}
export const REDUCERS = {
readallbydomain: TargetStore.reducer,
};
export const EFFECTS = [
TargetStore.Effects,
];
export const selectTargetState = createFeatureSelector<State>(MODULE.name);
export const ReadAllByDomainSelector = new StateSelector<TargetStore.State>(createSelector(
selectTargetState,
(state: State) => state.readallbydomain
));