Created
August 15, 2016 08:45
-
-
Save Finkes/a673d3ad9a55f36c6d1b6d10c8be8195 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Directive, Input, ElementRef} from '@angular/core'; | |
@Directive({ | |
selector: '[tooltip]', | |
host: { | |
'(mouseenter)': 'show($event)' | |
} | |
}) | |
export class Tooltip { | |
constructor(element: ElementRef){ | |
console.log(element);//.nativeElement.getBoundingClientRect()); | |
} | |
@Input('tooltip') text: string; | |
show(event) { | |
console.log(event); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment