How to use mouseover and mouseout in Angular 6

后端 未结 8 1012
既然无缘
既然无缘 2020-12-14 00:09

I have this older Angular code which works but not in the latest version of Angular 6.

8条回答
  •  有刺的猬
    2020-12-14 00:45

    To avoid blinking problem use following code
    its not mouseover and mouseout instead of that use mouseenter and mouseleave
    
    
    **app.component.html**
    
        
    Hide Show
    **app.component.ts** @Component({ selector: 'app-main', templateUrl: './app.component.html' }) export class AppComponent { changeText: boolean; constructor() { this.changeText = false; } }

提交回复
热议问题