XMLHttpRequest cannot load file 解决方案

80477204 2014-08-01

XMLHttpRequest cannot load file:///E:/java/happy/sina/each/1/angular/view1.html. Cross origin requests are only supported for HTTP. angular.js:8445
Error: A network error occurred.
    at Error (native)
    at file:///E:/java/happy/sina/each/1/js/angular/angular.min.js:78:466

第一种方式:把本地html文件部署到服务器上面测试

第二种方式:开启Chrome google-chrome  --allow-file-access-from-files  选项

相关推荐

80477204 / 0评论 2016-01-28