mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-21 11:59:53 +00:00
15 lines
375 B
TypeScript
15 lines
375 B
TypeScript
import { Directive, Input, ElementRef, OnChanges } from '@angular/core'
|
|
|
|
/** @hidden */
|
|
@Directive({
|
|
selector: '[fastHtmlBind]',
|
|
})
|
|
export class FastHtmlBindDirective implements OnChanges {
|
|
@Input() fastHtmlBind: string
|
|
constructor (private el: ElementRef) { }
|
|
|
|
ngOnChanges (): void {
|
|
this.el.nativeElement.innerHTML = this.fastHtmlBind || ''
|
|
}
|
|
}
|