Guest User

Untitled

a guest
Oct 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. const observable = api.callWithObservable();
  2. const promise = api.callWithPromise();
  3.  
  4. observable.subscribe(
  5. (result) => { /* on success */ },
  6. (error) => { /* on error */ }
  7. );
  8.  
  9. promise.then(
  10. (result) => { /* on success */ },
  11. (error) => { /* on error */ }
  12. );
Add Comment
Please, Sign In to add comment