[英]bottom sheet not closing on outside click in angular 6
I am using angular 6 material and I have implemented the bottom sheet in my code.我正在使用 angular 6 材料,并且在我的代码中实现了底部表单。 I have use the code given on the material website.我已经使用了材料网站上给出的代码。 I have import all the necessary modules.我已经导入了所有必要的模块。
Problem: bottom sheet not closing on outside click and also not getting a transparent background.问题:底部工作表没有在外部点击时关闭,也没有获得透明背景。
尝试删除禁用关闭,我在 stackbliz 中测试了您的代码并且它有效,控制台中有任何错误吗?
I was having the same issue .我遇到了同样的问题。 I fixed it by changing the value of hasBackdrop
to true in module.ts In documentation , it is set to false .我通过在 module.ts 中将 hasBackdrop 的值hasBackdrop
为true来修复它,在文档中,它被设置为 false 。 Maybe this will fix it .也许这会解决它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.