SHARE
TWEET

Untitled

a guest Sep 21st, 2019 74 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
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top