search

Home  >  Q&A  >  body text

angular.js - Questions about a piece of code in the angularjs document

This is a piece of code in the angularjs document

$http.jsonp is an asynchronous request. How can we ensure that the $http.jsonp request has been completed when the convert method is called.

巴扎黑巴扎黑2847 days ago559

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-15 17:03:19

    It is an asynchronous request, not an abnormal request. In this case, the service returns a method (console.log is Promise) instead of returning data (usually json), so that the request is sent when executed in the controller

    reply
    0
  • Cancelreply