Last active
March 15, 2019 16:57
-
-
Save aleixsuau/75135d946c64627f11ca8090798cf6ad to your computer and use it in GitHub Desktop.
This file contains 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
@Component({ | |
selector: 'app-help-hint-dynamic', | |
templateUrl: ` | |
<div class="help-hint-container"> | |
<div *ngTemplateOutlet="templateRef"></div> | |
<img src="https://cdn.onlinewebfonts.com/svg/img_28550.png" | |
[title]="hint" | |
(mouseover)="onMouseOver();" | |
*ngIf="hint"> | |
</div>`, | |
styleUrls: ['./help-hint-dynamic.component.css'] | |
}) | |
export class HelpHintDynamicComponent { | |
@Input() | |
hint: string; | |
@Input() | |
templateRef: TemplateRef<any>; | |
@Output() | |
helpHovered = new EventEmitter<void>(); | |
onMouseOver() { | |
this.helpHovered.emit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment