DeferredContentDirective class

When put on an element B, this directive creates B each time the nearest strict ancestor DeferredContentAware container A becomes visible and destroys B each time A becomes invisible.

Throws if A does not exist. This directive can be used to avoid the cost of eagerly instantiating invisible content and the cost of change-detection on invisible content.

Annotations
  • @Directive(selector: '[deferredContent]')

Constructors

DeferredContentDirective(ViewContainerRef _viewContainer, TemplateRef _template, DeferredContentAware parent, ChangeDetectorRef changeDetector)

Properties

deferredContentForceContent bool
Even when the content is not-visible force it to be on the page.
no getter
hashCode int
The hash code for this object.
no setterinherited
preserveDimensions bool
Create a placeholder element to maintain content size when hidden.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

ngOnDestroy() → void
Executed before the directive is removed from the DOM and destroyed.
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