Guest User

Untitled

a guest
Jan 18th, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. const actionsBus = new ActionsBus();
  2.  
  3. const addItem$ = actionsBus.actions$.pipe(
  4. filter(action => action.type === '[Shopping Cart] Add Item')
  5. );
  6.  
  7. addItem$.subscribe((addItemAction) => {
  8. console.log(addItemAction.payload);
  9. })
  10.  
  11. actionsBus.dispatch(new AddItem({ item: 'pizza' }));
Add Comment
Please, Sign In to add comment