tabby/terminus-core/src/directives/fastHtmlBind.directive.ts
Eugene Pankov 04a0a0cc64 lint
2020-03-01 16:10:45 +01:00

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 || ''
}
}