import { Directive , Input , ElementRef , Renderer2 , AfterViewInit } from '@angular/core' ; declare var $ ; @ Directive ( { selector : '[ngxSummernoteView]' } ) export class NgxSummernoteViewDirective implements AfterViewInit { @ Input ( ) set ngxSummernoteView ( content ) { this . _element . innerHTML = content || '' ; } private _element : any ; constructor ( private renderer2 , element ) { this . _element = element . nativeElement ; } ngAfterViewInit ( ) { this . renderer2 . addClass ( this . _element , 'ngx-summernote-view' ) ; } }