-
Notifications
You must be signed in to change notification settings - Fork 45
Angular 4.2.2: app component tag stacked instead of replacing the old one #52
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
Comments
Having the same issue |
+1 |
me too |
Any news on this? |
I have found a bit of a workaround for this by manually removing the element: @NgModule({ ... })
class AppModule {
constructor(public appRef: ApplicationRef) { }
hmrOnDestroy() {
const cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement);
// ...
cmpLocation.forEach(elem => {
(elem as any).remove();
});
}
} |
@kamshak This method does indeed remove the additional app components appended onto the bottom of the page but all styling and input values are also lost for modals/popups. |
+1 Saw this after re-building a docker image that was previously working fine. I thought I was going crazy. Downgrading "fixed" it. |
Opened a PR based on what was said here, but haven't quite battle tested it. Using it now and it seems okay. @gdi2290 any idea what it might be? |
+1 hmr is not working for new releases of angular. And downgrading angular is not a good solution ;) |
I'm still seeing this in 4.4.4 and 4.4.6. |
I was trying to upgrade my Angular from 4.1.3 to 4.2.2, but got a critical issue that the component stacked instead of replacing it:
Downgrade solved issue, also, I tried to kill node.exe and run again the app, the issue was still occurring.
The text was updated successfully, but these errors were encountered: