我有这个代码:
app.controller('MainCtrl', function ($scope, $http){
$http.get('api/url-api')
.success(function (data, status, headers, config){
}
}
Run Code Online (Sandbox Code Playgroud)
在我当地的环境中,工作正常,但在服务器中,返回此错误:
TypeError:$ http.get(...).success不是函数
有任何想法吗?谢谢