-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HMR] TypeError: Cannot read property 'has' of undefined #2
Comments
the actual line it crashes is the last one of these:
So elem.injector() returns undefined. |
i have a fork where i changed .querySelector('[ng-app]') to .querySelector('body') which fixed the problem in my case. I could make a pull request of it but this repo seems to live it's own life i think.. The current version of the repo seems to be pretty broken so i didn't start to fix that, but the one is in NPM. |
But yeh, I imagine your manually bootstrapping the app instead of using ng-app? can use the body / html as a fallback if ng-app doesnt exist |
I've forked this project and added configuration to select app root element. |
Is there any fix for that?? |
I tried to apply the angular-HMR to the existing project and got this error:
[HMR] TypeError: Cannot read property 'has' of undefined
at HotAngular.reloadState (http://localhost:8080/assets/style-guide.js:61911:26)
at module.exports as directive
at Object. (http://localhost:8080/assets/style-guide.js:67077:63)
at webpack_require (http://localhost:8080/assets/style-guide.js:521:30)
at hotApply (http://localhost:8080/assets/style-guide.js:476:14)
at hotUpdateDownloaded (http://localhost:8080/assets/style-guide.js:269:13)
at hotAddUpdateChunk (http://localhost:8080/assets/style-guide.js:249:13)
at webpackHotUpdateCallback (http://localhost:8080/assets/style-guide.js:5:12)
at http://localhost:8080/assets/0.b36e9a53c6b398f686b1.hot-update.js:1:1
Any advices, or is it a bug? The library seems to understand the angular directives and logs them into console, so i guess there is just a small bug somewhere.
The text was updated successfully, but these errors were encountered: