HighlightedTextComponent class
A component that presents a list of HighlightedTextSegments.
Example parent component:
var highlighter = new TextHighlighter();
var segments = highlighter.highlight(text, ['search', 'tokens']);
And template:
<highlighted-text [segments]="segments"></highlighted-text>
Use HighlightedValueComponent for highlighting a value instead of providing segments as required by this component.
- Annotations
-
- @Component(selector: 'highlighted-text', templateUrl: 'highlighted_text.html', styleUrls: ['highlighted_text.scss.css'], directives: [NgFor], changeDetection: ChangeDetectionStrategy.onPush)
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
segments
↔ List<
HighlightedTextSegment> ? -
List of HighlightedTextSegments to present.
getter/setter pair
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