【发布时间】:2020-07-23 12:59:50
【问题描述】:
我正在尝试为一个按钮添加涟漪效果,但它会使整个网页崩溃。
当我将matRipple 添加到我的按钮时,什么也没有发生。当我尝试添加颜色 [matRippleColor]="white" 时,我得到 “无法绑定到 'matRippleColor',因为它不是 'button' 的已知属性”。
这很奇怪,因为我在网站的其他页面上启用了涟漪,它工作得很好。 (所以是的,我已经导入了 MatRippleModule):
HTML:
<button matRipple class="submit-button" color="accent" type="submit" >
<mat-icon>search</mat-icon><span>Szukaj</span>
</button>
【问题讨论】: