xRay
xRay

Reputation: 801

matRipple not working in a specific component

I would like to start an animation on user interaction with matRipple attribute directive.

I have tried it with <i matRipple class="material-icons">create</i> and imported MatRippleModule from @angular/material, like this:

import { MatRippleModule } from '@angular/material';
imports: [
  MatRippleModule
]

If I click on the element, nothing happens and I don't even get an error message. Why doesn't it work for me?

Upvotes: 1

Views: 545

Answers (1)

xRay
xRay

Reputation: 801

I have figured out that I didn't see any changes because of the background color. I have added matRippleColor="orange" and now I see that it works.

Upvotes: 2

Related Questions