EmbeddedViewReflink
Represents an Angular View.
说明
A View is a fundamental building block of the application UI. It is the smallest grouping of Elements which are created and destroyed together.
Properties of elements in a View can change, but the structure (number and order) of elements in a View cannot. Changing the structure of Elements can only be done by inserting, moving or removing nested Views via a ViewContainerRef
. Each View can contain many View Containers.
属性
属性名 | 类型 | 说明 |
---|---|---|
context | 只读 | |
rootNodes | 只读 |
使用说明
Example
Given this template...
We have two TemplateRef
s:
Outer TemplateRef
:
Inner TemplateRef
:
Notice that the original template is broken down into two separate TemplateRef
s.
The outer/inner TemplateRef
s are then assembled into views like so: