PatrickJS / angular-hmr

:fire: Angular Hot Module Replacement for Hot Module Reloading
https://patrickjs.com
Apache License 2.0
506 stars 45 forks source link

Docs #5

Closed zwhitchcox closed 8 years ago

zwhitchcox commented 8 years ago

How do you use this?

LanderBeeuwsaert commented 8 years ago

Indeed, I tried to implement it in another Angular 2 project. Although I think I included all the necessary code I get 'Uncaught TypeError: Cannot read property 'location' of undefined' in chrome console when HMR tries to check/update the code.

Stacktrace: webpack-hmr.js:73 Uncaught TypeError: Cannot read property 'location' of undefined(anonymous function) @ webpack-hmr.js:73 hotApply @ bootstrap 1406622…:456 hotUpdateDownloaded @ bootstrap 1406622…:326 hotAddUpdateChunk @ bootstrap 1406622…:306webpack HotUpdateCallback @ bootstrap 1406622…:2 (anonymous function) @ VM1024 0.1406622….hot-update.js:1

Any idea what I forgot?

PatrickJS commented 8 years ago

I updated the readme a bit to include the missing main function https://github.com/gdi2290/angular2-hmr/blob/master/README.md