XMLHttpRequest無法加載文件。只支持HTTP的跨源請求我收到以下錯誤:XMLHttpRequest cannot load file:///C:/Users/richa.agiwal/Desktop/get/rm_Library/templates/template_viewSettings.html.
Cross origin requests are only supported for HTTP.我知道這個問題以前已經(jīng)回答過,但我仍然沒有找到解決問題的辦法。我試著跑chrome.exe --allow-file-access-from-files從命令提示符,并將文件移動到本地文件系統(tǒng),但我仍然得到相同的錯誤。謝謝你的建議!
3 回答

侃侃爾雅
TA貢獻1801條經(jīng)驗 獲得超16個贊
npm install http-server -g
http-server C:\location\to\app.
添加回答
舉報
0/150
提交
取消