-
Notifications
You must be signed in to change notification settings - Fork 519
HMR broken using Angular 2.4 #643
Comments
Did you rename the root component from |
Nope.
Ran: |
When HMR updates modules, it detaches and reattaches changed components. DomRenderer.prototype.detachView removes all component elements which have parentNode defined (for app element it will be body element). As a temporary bypass I use |
I also am seeing this. Thank you @nikitadmitry - I added that line in the ctor of app.component and this has helped resolve the issue for me also. I also have not changed the default name app as the selector. |
@nikitadmitry Thank you for the interim fix - I'm back in business over here as well |
For me HMR broke with angular 2.4.6. |
Thanks for the report. I've published |
The template is now updated to support HMR with newer Angular 2.x (tested with 2.4.7). |
Create a new Angular project with the experimental patch (v0.8.1). The app runs fine the first time but if you update a file (say home.component.html) the browser goes blank and you see a bunch of errors in the console:
EXCEPTION: Error in :0:0 caused by: The selector "app" did not match any elements
The text was updated successfully, but these errors were encountered: