Angular Observables and Http

前端 未结 3 1737
遇见更好的自我
遇见更好的自我 2020-12-15 10:12

I\'m having a hard time wrapping my brain around observables in Angular. I\'m coming from the world of PHP, where things are definitely not async.

I have a componen

3条回答
  •  天涯浪人
    2020-12-15 10:47

    Though I'm not sure to understand your question, possibly Observable.selectMany and Observable.and/thenDo/when can help you.

    https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/selectmany.md

    https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/operators/when.md

    In your case, I think it makes you to create a transaction of fetching and inserting.

提交回复
热议问题