TemplatePortalDirective class
An implementation of TemplatePortal as an Angular directive.
Example: <template portal (ready)="onReady($event)"> Hello {{name}}!
- Inheritance
-
- Object
- Portal<
Map< String, dynamic> > - TemplatePortal
- TemplatePortalDirective
- Annotations
-
- @Directive(selector: '[portal]')
Constructors
- TemplatePortalDirective(TemplateRef templateRef, ViewContainerRef viewContainerRef)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAttached → bool
-
Returns true if this portal is in the process of being attached but the
host has not loaded it yet or if the host has already loaded it.
no setterinherited
-
locals
→ Map<
String, dynamic> -
Local variables that are defined for the context of this template.
no setterinherited
- origin → dynamic
-
no setterinherited
-
ready
→ Stream<
TemplatePortalDirective> -
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- template → TemplateRef
-
The template this portal originated from.
finalinherited
- viewContainer → ViewContainerRef
-
The ViewContainerRef this portal originated from.
finalinherited
Methods
-
attach(
PortalHost? host, [Map< String, dynamic> locals = const {}]) → Future<Map< String, dynamic> ?> -
Attach to the
host
, optionally withlocals
specific to this instance.inherited -
clone(
) → TemplatePortal -
Creates a copy of this portal that can also be attached.
inherited
-
detach(
) → Future< void> -
Detaches the portal if attached to a host.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAttachedHost(
PortalHost? host) → void -
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited