[英]Angular material 2 tooltip issue
I simply added tooltip to a div like so : 我只是将工具提示添加到div中,如下所示:
<div matTooltip="yeayh">
</div>
And added the 2 module below to the parent module : 并将下面的2个模块添加到父模块:
BrowserAnimationsModule,
MatTooltipModule,
The toolTip is displayed with no issue but I get this in the browser console : 显示的工具提示没有问题,但是我在浏览器控制台中看到了:
ERROR TypeError: Cannot read property 'matches' of null
at Object.eval [as updateRenderer] (TooltipComponent.html:1)
at Object.debugUpdateRenderer [as updateRenderer] (core.js:11087)
at checkAndUpdateView (core.js:10463)
at callViewAction (core.js:10699)
at execComponentViewsAction (core.js:10641)
at checkAndUpdateView (core.js:10464)
at callViewAction (core.js:10699)
at execEmbeddedViewsAction (core.js:10662)
at checkAndUpdateView (core.js:10459)
at callViewAction (core.js:10699)
尝试更改“ @ angular / cdk”版本(例如“ ^ 6.0.0”)
try to update angular material to the new version 7.2.1 see instruction angulat material install 尝试将角形材料更新到新版本7.2.1,请参阅angulat材质安装说明
then add to the file "\\src\\styles.css" the CSS 然后将CSS添加到文件“ \\ src \\ styles.css”
@import '@angular/material/prebuilt-themes/deeppurple-amber.css'; @import'@ angular / material / prebuilt-themes / deeppurple-amber.css';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.