encapsulation property

ViewEncapsulation encapsulation
final

Controls how this component's styles are scoped to the DOM.

Defaults to ViewEncapsulation.Emulated, which emulates scoped styles by adding unique attributes to elements. Other options:

  • ViewEncapsulation.None - styles are global (not recommended).
  • ViewEncapsulation.ShadowDom - uses native Shadow DOM (if supported).

Implementation

final ViewEncapsulation encapsulation;