angular.js - 关于angularjs文档里面一段代码的疑问
巴扎黑
巴扎黑 2017-05-15 17:01:19
0
1
509

这个是angularjs文档里面的一段代码

$http.jsonp是异步请求啊,怎么能保证在调用convert方法的时候,$http.jsonp已经请求完成。

巴扎黑
巴扎黑

reply all(1)
大家讲道理

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!