In your js/ts file for the html that will be hovered
@Output() elemHovered: EventEmitter<any> = new EventEmitter<any>();
onHoverEnter(): void {
this.elemHovered.emit([`The button was entered!`,this.event]);
}
onHoverLeave(): void {
this.elemHovered.emit([`The button was left!`,this.event])
}
In your HTML that will be hovered
(mouseenter) = "onHoverEnter()" (mouseleave)="onHoverLeave()"
In your js/ts file that will receive info of the hovering
elemHoveredCatch(d): void {
console.log(d)
}
In your HTML element that is connected with catching js/ts file
(elemHovered) = "elemHoveredCatch($event)"