In Angular material you have the lovely ripple effect on a lot of the components. When you click on a mat-list-item the ripple effect happens.
Now with buttons and many other components you can trigger the ripple effect with button.ripple.launch(...)
but with mat-list-item I see no such functionality. I'd like to be able to do it to inform users of changes made to the list.
Does anyone know of a workaround? I've tried dispatching 'click' from the MatListItem's _getHostElement(), but to no avail.
EDIT
Thanks to everybody who's helped out! I think in the end I'll just design my own list component that gives me access to its MatRipple directive. I've forked pr41's stackblitz to have the situation be similar to what I have (a list generated with *ngFor) and if anyone knows what to put here:
this.listChildren.map((item: MatListItem) => {
// item is the MatListItem. How do I access its ripple directive?
});
that would be great!
The Fork: https://stackblitz.com/edit/angular-mmjda4-ssoajs?file=app%2Flist-overview-example.ts