Edi*_*zic 0 javascript bing-maps angularjs
嗨,我正在尝试使用Angularjs获取BING MAPS API,但我在控制台中收到此错误:
TypeError: $http.jsonp(...).success is not a function
Run Code Online (Sandbox Code Playgroud)
这是我的控制器
.controller('bingMaps', ['$scope', '$http', MapController]);
function MapController($scope, $http) {
var vm = this;
vm.mapsearch = function() {
var url = "http://dev.virtualearth.net/REST/v1/Locations?callback=JSON_CALLBACK&key=MYKEY&o=json";
$http.jsonp(url)
.success(function(data){
console.log('success');
})
.error(function () {
console.log('error')
});
}
}
Run Code Online (Sandbox Code Playgroud)
从JSONP中删除Angular v1.6 success
和error
方法:
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
归档时间: |
|
查看次数: |
1944 次 |
最近记录: |