import { Directive , ElementRef , Renderer2 , Input } from '@angular/core' ; @ Directive ( { selector : '[froalaView]' } ) export class FroalaViewDirective { private _element : HTMLElement ; constructor ( private renderer , element ) { this . _element = element . nativeElement ; } @ Input ( ) set froalaView ( content ) { this . _element . innerHTML = content ; } ngAfterViewInit ( ) { this . renderer . addClass ( this . _element , "fr-view" ) ; } }