md-overlay-container duplicated with angular-hmr
See original GitHub issueBug:
When using Hot Module Reload and
provide(OVERLAY_CONTAINER_TOKEN, {useValue: createOverlayContainer()}),
each reload duplicates md-overlay-container overlay div
What is the expected behavior?
Only one overlay div
What is the current behavior?
Overlay div duplicated
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:20 (6 by maintainers)
Top Results From Across the Web
Angular 4 OverlayContainer duplicate - modal dialog
I think in this case you just have to detach/dispose the things you no longer need const overlayRef = this.overlay.create({.
Read more >angular/angular - Gitter
hello I want to start a project using ng2, webpack and ngrx (and optionaly bootstrap4 + ng2-dragula + ng2-smartable), any starter recommandation ...
Read more >The State of HMR in Angular - JavaScript in Plain English
Angular 11 made it easy to use HMR by providing it out-of-box in the CLI. ... Duplicate subscriptions could be created as HMR...
Read more >Falcon Sandbox v8.30 © Hybrid Analysis
Submit malware for free analysis with Falcon Sandbox and Hybrid Analysis technology. Hybrid Analysis develops and licenses analysis tools to fight malware.
Read more >ANGULAR 4 Pocket Primer - DOKUMEN.PUB
Duplication or dissemination of any text, code, simulations, images, ... The Reason for Skipping Angular 3 ... Hot Module Reloading (HMR) and Webpack....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please, HMR is reaaaaaaaaaaaaaaaallly necessary feature for us, EVERY DAY!
Dear Material team, Could you make HMR work properly with material 2?
I’m experiencing the same as @borislemke reports. I added HMR to my project and if there’s a dialog open, a ghost overlay-container is added.
More importantly, the dialog loses it’s bind to the styles. If you look at the
<head>
section of the document, among the injected<styles>
tags you can find the specific<style>
dedicated tomat-dialog-container
. After a save (with hmr enabled), this style tag disappears. Angular “forgets” to inject the style back to the document.To reproduce:
mat-dialog-container
element<style>…</style>
link to the right of themat-dialog-container
class name - It’ll take you to the <head> section and focus you on the relevant<style>
tag<style>
tag in the head disappears.I hope someone can get to the bottom of this. As I work on dialogs at the moment, I have to disable HMR as it makes it impossible to save any changes without a manual reload of the page.
Before HMR reload
After HMR reload