Why does Rxjs's pipe wait for the end of ajax to continue like Promise's then?

in Angular , what should I do with Rxjs if one request depends on the result of another?

this.getOne().then(data => {
  // Promise
  return this.getTwo(data);
}).then(data => {
  console.log(data);  // Promise
  return this.getThree(data);
}).then(data => {
  console.log(data); // Promise
})

above is the effect achieved with Promise. How can you achieve a similar purpose with Rxjs"s pipe?


mergeMap :

from(this.getOne)
    .pipe(
        mergeMap(oneData => {
            console.log(oneData)
            return from(this.getTwo)
        }),
        mergeMap(twoData => {
            console.log(twoData)
            return from(this.getThree)
        })
    )
    .subscribe(threeData => {
        console.log(threeData)
        ...
    })
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1befe89-31431.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1befe89-31431.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?