0
我正在訪問返回JSON的REST服務。 JSON響應格式爲 JQUERY_1234({ABC:[]})。 使用angularJS和IE9作爲瀏覽器,我得到一個錯誤,說SCRIPT 5009:'JQUERY_1234'是未定義的。我是angular JS的新手,希望得到一些關於我出錯的指導。 相同的代碼適用於另一個URL,但在這一個上失敗。謝謝你的幫助!AngularJS IE錯誤:SCRIPT 5009:'JSON_XYZ'未定義
我的控制器代碼是:
var myNameSpace=angular.module('myApp',[]);
myNameSpace.controller('MyController',function MyController($scope,$http){
$http.jsonp('URL').success(function(data) {
$scope.artists = data;
})
.error(function (data, status, headers, config) {
alert("error:" + status);
return status;
});
$scope.orderAlerts='Name';
});