-
Notifications
You must be signed in to change notification settings - Fork 6
Using The Store
William Horn edited this page Jul 23, 2019
·
6 revisions
export interface FiltersState {
dateRange: DateRangeState;
...more properties
}
The selector is used to get a specific slice of the state object.
export const getStartDate = createSelector(
getFiltersState,
(state: FiltersState) => state.dateRange.start // Pull out the start date
);
This is the arrow from the state
bubble to the component in the diagram.
store$.select
can be used anywhere the Store
service can be injected.
const startDate$: Observable<Date> = this.store$.select(getStartDate);