0

I got this error when I used the plunk example of the Hero Editor Tutorial locally. I mean by locally copy every files in a local folder and open index.html in the browser. (https://angular.io/resources/live-examples/toh-1/ts/plnkr.html)

What happen?

Error: XHR error loading file:///Users/ksenechal/angular2-quickstart/app/app.component.ts run angular2-polyfills.js:138
Error loading file:///Users/ksenechal/angular2-quickstart/app/app.component.ts as "./app.component" from file:///Users/ksenechal/angular2-quickstart/app/boot.ts
column: 99
line: 4
message: "XHR error loading file:///Users/ksenechal/angular2-quickstart/app/app.component.ts
Error loading file:///Users/ksenechal/angular2-quickstart/app/app.component.ts as \"./app.component\" from file:///Users/ksenechal/angular2-quickstart/app/boot.ts"
sourceURL: "https://code.angularjs.org/tools/system.js"
stack: "o@https://code.angularjs.org/tools/system.js:4:12703↵onreadystatechange@https://code.angularjs.org/tools/system.js:4:13220↵run@https://code.angularjs.org/2.0.0-beta.0/angular2-polyfills.js:138:22↵zoneBoundFn@https://code.angularjs.org/2.0.0-beta.0/angular2-polyfills.js:111:22"
Prototype Error
SnareChops
  • 13,175
  • 9
  • 69
  • 91
kevins
  • 46
  • 5
  • I don't get any errors when loading the plnkr. DId you made any changes ? – Romain Dec 17 '15 at 09:34
  • The plunker example works well but if you copy everything locally on your computer and launch index.html page in your browser (not with plunk). It doesn't work. – kevins Dec 17 '15 at 10:36
  • 1
    I guess that's because local XMLHttpRequest aren't allowed. Check this answer : [XMLHttpRequest for local files](http://stackoverflow.com/a/11063963/5571541) – Romain Dec 17 '15 at 13:48

0 Answers0