If the mouse over for all over the component is your option, you can directly is @hostListener
to handle the events to perform the mouse over al below.
import {HostListener} from '@angular/core';
@HostListener('mouseenter') onMouseEnter() {
this.hover = true;
this.elementRef.nativeElement.addClass = 'edit';
}
@HostListener('mouseleave') onMouseLeave() {
this.hover = false;
this.elementRef.nativeElement.addClass = 'un-edit';
}
Its available in @angular/core
. I tested it in angular 4.x.x