NgTemplateOutletlink
Inserts an embedded view from a prepared TemplateRef.
根据一个提前备好的 TemplateRef 插入一个内嵌视图。
选择器
输入参数
说明
You can attach a context object to the EmbeddedViewRef by setting [ngTemplateOutletContext]. [ngTemplateOutletContext] should be an object, the object's keys will be available for binding by the local template let declarations.
你可以通过设置 [ngTemplateOutletContext] 来给 EmbeddedViewRef 附加一个上下文对象。 [ngTemplateOutletContext] 是一个对象,该对象的 key 可在模板中使用 let 语句进行绑定。
Note: using the key $implicit in the context object will set its value as default.
注意:在上下文对象中使用 $implicit 这个 key 会把对应的值设置为默认值。
Example
例子
属性
| 属性名 | 类型 | 说明 |
|---|---|---|
| ngTemplateOutletContext | ||
| ngTemplateOutlet |
方法
参数
|