简体   繁体   English

在现有应用程序中添加 Angular MatDialog 可防止页面滚动

[英]Adding Angular MatDialog in existing app prevents page scrolls

I added angular material MatDialog to show model window which accepts Form data from the user.我添加了角度材料 MatDialog 来显示模型窗口,该窗口接受来自用户的表单数据。

I added this in app.scsss file我在 app.scsss 文件中添加了这个

@import '~@angular/material/prebuilt-themes/indigo-pink.css';

Now the model opens when clicking on the button but the entire window has no more scrolls available in app in each of the components.现在,单击按钮时模型会打开,但整个窗口在应用程序中的每个组件中都没有更多可用的滚动条。

I think this happens whenever i add any angular material component into my existing app,that it stops scrolling.我认为每当我将任何角度材料组件添加到我现有的应用程序中时都会发生这种情况,它会停止滚动。

Thanks.谢谢。

Step 1: Remove node_modules Step 2: npm install步骤 1:删除 node_modules 步骤 2:npm install

Fixed an issue.修复了一个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM