问题描述:

I am trying to get an Angularjs app running but I keep getting the following silent exceptions:

"imageService.getImages().success.arguments Accessing the 'arguments' property of a function is not allowed in strict mode"

and

"imageService.getImages().success.caller Accessing the 'caller' property of a function or arguments object is not allowed in strict mode"

when creating any function in my javascript file even though I am not using the "strict mode".

The environment is VS 2013 ASP.NET web with index.html and AngularJS.

The code segment below creates the functions and throws the silent exceptions at runtime and nothing is displayed:

//app.js

angular.module('photoBrowser', [])

.service('imageService', function($http){

return {

getImages: function () {

return $http.get("/photos.json", { responseType: "JSON" });

}

}

})

.controller('photoList', function ($scope, imageService) {

imageService.getImages().success(function (result) {

$scope.images = result;

})

})

相关阅读:
Top