Reputation: 6963
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
Upvotes: 2
Views: 6400
Reputation: 5826
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.
Upvotes: 8