2

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. 

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

4
  • Use a Webserver to serve the files. Something like apache. Then you can access the files via localhost/.../holidayList.ht Commented Aug 5, 2013 at 8:27
  • Or Start chrome with the Parameter --allow-running-insecure-content Commented Aug 5, 2013 at 8:29
  • I don't want to use Web Server Commented Aug 5, 2013 at 8:29
  • Hi tschiela Your command is not working Commented Aug 5, 2013 at 8:41

1 Answer 1

8

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

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

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

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.