Angularjs:铬原产地零是不允许通过访问控制允许来源:无法加载资源 [英] Angularjs: Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin in chrome

查看:232
本文介绍了Angularjs:铬原产地零是不允许通过访问控制允许来源:无法加载资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AngularJS V1.1.5并尝试使用加载模板NG-包括

I am using AngularJS v1.1.5 and try to load templates using ng-include,

Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin. file:///E:/apps/partials/holidayList.html

XMLHttpRequest cannot load file:///E:/apps/partials/holidayList.html. Origin null is not allowed by Access-Control-Allow-Origin. 

我已经尝试了镀铬的命令行选项,它不是为我工作的禁用政策,我不想命令行选项,任何事情我需要anguarjs文件进行编辑

i have already tried command line options for chrome, it not working for me to disable the policy and i don't want command line options, Any thing i need to edit in anguarjs file

推荐答案

您需要使用下面的命令打开你的浏览器。 (preSS窗口+ R)

You need to open your chrome with following command. (Press window+R)

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

请注意:您的Chrome绝不能打开。当您运行此命令镶边将自动打开。

Note : Your chrome must not be open. When you run this command chrome will open automatically.

如果您在命令提示符下输入以下命令,然后选择您的Chrome安装目录,然后使用这个命令。

If you are entering this command in command prompt then select your chrome installation directory then use this command.

这篇关于Angularjs:铬原产地零是不允许通过访问控制允许来源:无法加载资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆