ViewEncapsulation

ViewEncapsulation

Stable Enum

Class Overview

class ViewEncapsulation {
  Emulated 
  Native 
  None 
}

Class Description

Class Details

Emulated

Emulate Native scoping of styles by adding an attribute containing surrogate id to the Host Element and pre-processing the style rules provided via ViewMetadata or ViewMetadata, and adding the new Host Element attribute to all selectors.

This is the default option.

Native

Use the native encapsulation mechanism of the renderer.

For the DOM this means using Shadow DOM and creating a ShadowRoot for Component's Host Element.

None

Don't provide any template or style encapsulation.

exported from core-index, defined in core/src/metadata/view.ts

© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/docs/ts/latest/api/core/index/ViewEncapsulation-enum.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部