You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the encapsulation property to the ComponentMetadata (for example with ViewEncapsulation.None the styles are reloaded correctly. However when changing the mode after that the styles don't change. I think this can be fixed in updateMetadata(component) but I am not sure why the current approach doesn't work.
This one is actually caused by Angular and I am not sure i this can be solved. When Angular discovers a component with encapsulation set to Emulated or None it appends the styles of the component as styles to the <head></head> section. So when we reload the component the styles are added again but are not removed. This then looks something like this:
Because Angular discovers the style-tag that has already been set, it changes the selector that emulates the shadow DOM in some random way.
I don't know if it would be too much of an effort to implement this feature, but maybe I haven`t fully understood the problem so I am leaving this issue up. This is not an important feature, just something that came to my mind when playing around with the hot-loader.
The text was updated successfully, but these errors were encountered:
When adding the
encapsulation
property to theComponentMetadata
(for example withViewEncapsulation.None
the styles are reloaded correctly. However when changing the mode after that the styles don't change.I think this can be fixed inupdateMetadata(component)
but I am not sure why the current approach doesn't work.This one is actually caused by Angular and I am not sure i this can be solved. When Angular discovers a component with
encapsulation
set toEmulated
orNone
it appends the styles of the component as styles to the<head></head>
section. So when we reload the component the styles are added again but are not removed. This then looks something like this:Because Angular discovers the style-tag that has already been set, it changes the selector that emulates the shadow DOM in some random way.
I don't know if it would be too much of an effort to implement this feature, but maybe I haven`t fully understood the problem so I am leaving this issue up. This is not an important feature, just something that came to my mind when playing around with the hot-loader.
The text was updated successfully, but these errors were encountered: