0.0.2 • Published 3 years ago
2yy-ngx-ripple v0.0.2
NgxRipple
Installation
npm i 2yy-ngx-ripple
Motivation
By default, Ripples triggered by click event.
But, if you want trigger Ripples by mouseenter event, you can achieve it with NgxRippleService
.
Usage
In your foo.component.ts
:
@ViewChild('btn', {read: MatRipple}) btnRef: MatRipple;
constructor(public rippleService: NgxRippleService) {}
Then, in your foo.component.html
:
<button #btn matRipple (mouseenter)="rippleService.show(btnRef)" (mouseleave)="rippleService.hide(btnRef)">My Button</button>