Guest User

Untitled

a guest
May 21st, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. 1) obs1 = Observable.of(["abc","xyz"]
  2. 2) obs2 =Observable.of({
  3. id:123;
  4. value:"company";
  5. name: abc;
  6. })
  7.  
  8. obs3= Observable.combineLatest(
  9. obs1,
  10. ob2,methodToProcess
  11. );
  12.  
  13. methodToProcess(obs1, obs2) {
  14. return {
  15. first:obs2.name !== 'a'? obs2: {
  16. ...obs2,
  17. name: obs1.includes('a') ? 'a' : obs1[0]
  18. }
  19. };
  20. }
  21.  
  22. obs4 = Observable.of(sessionStorage.getItem("name");
Add Comment
Please, Sign In to add comment