Last active
February 18, 2020 02:31
-
-
Save alexytiger/db3fecc233be9ed393c43cf497b7cd04 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
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(this.handleError(err), SpinnerActions.hide())) | |
) | |
) | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment