mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This change aligns the settings between G3 and P3 as `REMOVE_STYLES_ON_COMPONENT_DESTROY_DEFAULT` is already set to `true` internally.
BREAKING CHANGE: `REMOVE_STYLES_ON_COMPONENT_DESTROY` default value is now `true`. This causes CSS of components to be removed from the DOM when destroyed. You retain the previous behaviour by providing the `REMOVE_STYLES_ON_COMPONENT_DESTROY` injection token.
```ts
import {REMOVE_STYLES_ON_COMPONENT_DESTROY} from '@angular/platform-browser';
...
providers: [{
provide: REMOVE_STYLES_ON_COMPONENT_DESTROY,
useValue: false,
}]
```
PR Close #51571
|
||
|---|---|---|
| .. | ||
| events | ||
| dom_renderer_spec.ts | ||
| shadow_dom_spec.ts | ||
| shared_styles_host_spec.ts | ||