Last active
September 10, 2019 03:32
-
-
Save alexytiger/48237b6afbfc94efafdf7e64eb6cec7f to your computer and use it in GitHub Desktop.
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
| loadProducts$ = createEffect(() => | |
| this.actions$.pipe( | |
| ofType(PurchaseContractActions.loadProducts), | |
| switchMap(() => | |
| this.fleaSrv.getPurchaseContractList().pipe( | |
| tap(products => console.log('purchase contracts:', products)), | |
| map(products => PurchaseContractActions.loadProductsSuccess({ products })), | |
| catchError((err: Error) => | |
| of(ErrorActions.errorMessage({ errorMsg: err.message }), | |
| SpinnerActions.hide()) | |
| ) | |
| ) | |
| ) | |
| )) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment