Created
October 30, 2020 17:07
-
-
Save mike1477/73074ebdb4472efdbf84dfcc376896a6 to your computer and use it in GitHub Desktop.
John
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private store: Store<AprState> | |
apr$: Observable<AprViewModel>; | |
//replace snippet | |
this.apr$ = this.store.pipe(select(fromAprSelectors.selectedApr)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface AprViewModel { | |
apr: string; | |
aprid: string; | |
} | |
export const selectedApr = createSelector( | |
selectAprState, | |
(state: yourReducer.yourreducerstatename):AprViewModel => { | |
return { | |
apr: state.selectedApr, | |
aprId: state.selectedAprId | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment