【发布时间】:2017-03-15 23:29:49
【问题描述】:
我有一个单页 html 和 Angularjs 文件。
App.js
angular
.module('vod', [])
.controller('moviesController', ['$http', function ($http) {
var self = this;
self.movies = [];
$http.get('http://localhost:8080/movies/').then(function (response) {
self.movies = response.data;
}, function (errResponse) {
console.error('Error while fetching movies');
});
}]);
HTML
<!DOCTYPE html>
<html>
<head>
<title>Angular</title>
<script src="angular.min.js"></script>
<script src="app.js"></script>
</head>
<body ng-controller="moviesController as ctrl"
ng-app="vod">
<div ng-repeat="movie in ctrl.movies">
<span ng-bind="movie.title"></span>
</div>
</body>
</html>
它在生成电影标题的 Chrome 上运行良好,但会出现错误SCRIPT7002: XMLHttpRequest: Network Error 0x2, The system cannot find the file specified
和
Microsoft Edge 上的SCRIPT7002: XMLHttpRequest: Network Error 0x2efd, Could not complete the operation due to error 00002efd.。
【问题讨论】:
-
我有同样的问题吗?解决方案?
-
我也有这个问题
标签: javascript angularjs ajax microsoft-edge