How to make a sequence of http requests in Angular 6 using RxJS

前端 未结 4 1174
不思量自难忘°
不思量自难忘° 2020-12-03 16:10

I\'ve been looking for a solution all over the web, but couldn\'t find anything that fits my user case. I\'m using the MEAN stack (Angular 6) and I have a registration form.

4条回答
  •  余生分开走
    2020-12-03 16:18

    Try this , Angular provides feature to call multiple API at a time.

    forkJoin()
    

    You will get data in array as in same sequence which you call API.

    Ex:

    forkJoin(request1, request2)
        .subscribe(([response1, response2]) => {
    

    You can find more read

    I have also given another answer. Please check this, it may also helps you.

提交回复
热议问题