import { Directive , ViewContainerRef , Input , OnInit } from "@angular/core" ; declare var jQuery ; link @ Directive ( { selector : "[smDirTooltip]" } ) export class SMTooltipDirective implements OnInit { @ Input ( ) smDirTooltip : string ; @ Input ( ) smDirPosition : string ; constructor ( public element ) { } ngOnInit ( ) { this . element . element . nativeElement . setAttribute ( "data-position" , this . smDirPosition || "top center" ) ; this . element . element . nativeElement . setAttribute ( "data-tooltip" , this . smDirTooltip ) ; } }