解析angular.js中的JSONP $ http.jsonp()響應(yīng)我正在使用angular的$http.jsonp()請求,該請求成功返回包含在函數(shù)中的json:var url = "http://public-api.wordpress.com/rest/v1/sites/wtmpeachtest.wordpress.com/posts?callback=jsonp_callback";$http.jsonp(url).
success(function(data, status, headers, config) {
//what do I do here?
}).
error(function(data, status, headers, config) {
$scope.error = true;
});如何訪問/解析返回的函數(shù)包裝JSON?
解析angular.js中的JSONP $ http.jsonp()響應(yīng)
溫溫醬
2019-07-23 19:25:05