TemplateRef class
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 from a Component or a Directive via Query.
To instantiate Embedded Views based on a Template, use
ViewContainerRef#createEmbeddedView, which will create the View and attach
it to the View Container.
Constructors
-
TemplateRef(ViewContainer _viewContainer, EmbeddedView<
void> _viewFactory(RenderView, int))
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createEmbeddedView(
) → EmbeddedViewRef - Instantiates an instance of the provided template.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited