错误:无法在’XMLHttpRequest’上执行’send’:无法加载’file’:AngularJS SPA

我是Angular SPA的新手,我第一次通过Googling获得代码并尝试运行。 但是我在Console中遇到了一些错误。 我无法弄清楚原因,我找到了以下控制台错误的列表:

XMLHttpRequest无法加载file:/// C:/Users/hp/Downloads/single-page-app-angularjs-master/home.html。 交叉源请求仅支持协议方案:http,数据,chrome,chrome-extension,https,chrome-extension-resource。

错误:无法在’XMLHttpRequest’上执行’send’:无法加载’file:/// C:/Users/hp/Downloads/single-page-app-angularjs-master/home.html’。 XMLHttpRequest无法加载file:/// C:/Users/hp/Downloads/single-page-app-angularjs-master/about.html。 交叉源请求仅支持协议方案:http,数据,chrome,chrome-extension,https,chrome-extension-resource。

错误:[$ compile:tpload] http://errors.angularjs.org/1.3.3/ $ compile / tpload?p0 = home.html

    Single page web app using Angularjs            

在Windows上:

 chrome.exe --allow-file-access-from-files 

要么

 chrome.exe --allow-file-access-from-files --disable-web-security 

在Mac上:

 open /Applications/Google\ Chrome.app/ --args --allow-file-access-from-files 

我面对类似的东西,并使用像Glassfish这样的应用程序服务器解决…

换句话说,使用http:// protocol而不是file://