TemplateRef
TemplateRef
Stable Class
Class Overview
class TemplateRef { C elementRef : ElementRef createEmbeddedView(context: C) : EmbeddedViewRef<C> }
Class Description
Represents an Embedded Template that can be used to instantiate Embedded Views.
You can access a TemplateRef
, in two ways. Via a directive placed on a <template>
element (or directive prefixed with *
) and have the TemplateRef
for this Embedded View injected into the constructor of the directive using the TemplateRef
Token. Alternatively you can query for the TemplateRef