search

Home  >  Q&A  >  body text

angular.js - angularjs实现利用第一次http请求结果发起第二次http请求,不想嵌套着写,怎么优雅实现?

angularjs实现利用第一次http请求结果发起第二次http请求,不想嵌套着写,怎么优雅实现?

巴扎黑巴扎黑2745 days ago615

reply all(3)I'll reply

  • 迷茫

    迷茫2017-05-15 16:56:48

    To use promise, you can read an article I wrote before, I hope it can help you, promise.

    reply
    0
  • 阿神

    阿神2017-05-15 16:56:48

    Use promise写法,可以使用$q service.

    reply
    0
  • 怪我咯

    怪我咯2017-05-15 16:56:48

    http://stackoverflow.com/questions/9432587/what-is-the-correct-way-to-chain-async-calls-in-javascript

    reply
    0
  • Cancelreply