Guest User

Untitled

a guest
Sep 21st, 2019
78
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. loadProducts$ = createEffect(() =>
  2. this.actions$.pipe(
  3. ofType(PurchaseContractActions.loadProducts),
  4. switchMap(() =>
  5.  
  6. this.fleaSrv.getPurchaseContractList().pipe(
  7. tap(products => console.log('purchase contracts:', products)),
  8. map(products => PurchaseContractActions.loadProductsSuccess({ products })),
  9. catchError((err: Error) =>
  10. of(ErrorActions.errorMessage({ errorMsg: err.message }),
  11. SpinnerActions.hide())
  12. )
  13. )
  14. )
  15. ))
RAW Paste Data