LiSafeHtmlDirective class
Unified directive that renders trusted HTML text and/or appends a trusted
DOM Node into the host element in a single pass, avoiding the
double-render / layout-thrashing caused by separate liSafeInnerHtml +
liSafeAppendHtml directives fighting over the same element.
Usage:
<td [liSafeHtml]="column.value" [liSafeHtmlNode]="column.htmlElement"></td>
Priority: if liSafeHtmlNode is non-null it wins (the element is cleared and
the node is appended). Otherwise, liSafeHtml is written via
setInnerHtml. When both are null/empty the element is cleared.
- Annotations
-
- @Directive.new(selector: '[liSafeHtml],[liSafeHtmlNode]')
Constructors
- LiSafeHtmlDirective(Element _element)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- liSafeHtml ← String?
-
no getter
- liSafeHtmlNode ← Node?
-
no getter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
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