ssbb
ssbb

Reputation: 1931

event click start and click realease angular(4)

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?

Upvotes: 4

Views: 5303

Answers (1)

Milad
Milad

Reputation: 28592

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

Upvotes: 6

Related Questions