Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

event click start and click realease angular(4)

Tags:

angular

I have an issue with angular click event system.

   <div class="login__visiblePasswd">
    <a md-mini-fab (click)="togglePassword($event)" (mouseout)="setMdpPassword()"><md-icon>visibility</md-icon></a>
</div>

I have a button which display the password when click and hide it back on mouseout. What I really need is "on click start" call the methode toggle password, and "on click release", hide it back. I can't find any (clickstart) (clickrelease) event so far. By default, the (click) event only proc when the user does release the mouse boutton.

Do you know how to solve that problem with event/ other options?

like image 637
ssbb Avatar asked Oct 13 '25 11:10

ssbb


1 Answers

 <div class="login__visiblePasswd">
    <a md-mini-fab (mousedown)="togglePassword($event)" (mouseup)="setMdpPassword()"><md-icon>visibility</md-icon></a>
</div>
like image 78
Milad Avatar answered Oct 15 '25 14:10

Milad