Last active
February 19, 2020 00:24
-
-
Save alexytiger/f377b59e0f575086e95f341cc6afb9dd to your computer and use it in GitHub Desktop.
e-book
This file contains hidden or 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
loadPurchaseContract$ = createEffect( | |
() => this.actions$.pipe( | |
ofType(PurchaseContractActions.loadPurchaseContract), | |
map(action => action.address), | |
switchMap(address => { | |
return this.purchaseSrv.loadPurchaseContract(address).pipe( | |
map(contract => | |
PurchaseContractActions.loadPurchaseContractSuccess({ contract })), | |
catchError((err: Error) => | |
of(this.handleError(err), SpinnerActions.hide())) | |
); | |
}) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment