ngx-smart-modal - Angular 6 [英] ngx-smart-modal - Angular 6
问题描述
我按照这个 StackBlitz 示例 添加了 te ngx-智能模态
窗口.
I followed this StackBlitz example to add te ngx-smart-modal
window.
一切都很顺利,只是组件在页面上而不是在灯箱模式弹出窗口中打开.
Everything went well, except the component opens on the page instead of in a Lightbox modal pop-up.
此示例使用的是 Angular 4.
This example is using Angular 4.
有人在 Angular 6 中成功使用过这个模块吗?
Has anybody used this module in Angular 6 successfully?
推荐答案
对于 ngx-smart-modal v7.1.0,我只是添加了 .css 或 .scss(在我的例子中是 .scss,因为这是我的默认文件扩展名)在我的 Angular 项目中设置)文件到 angular.json 的样式部分.
For ngx-smart-modal v7.1.0, I simply added the .css or .scss (.scss in my case since that is the default file extension I have setup in my Angular project) file to the styles section of your angular.json.
"styles": [
...
"node_modules/ngx-smart-modal/ngx-smart-modal.scss",
...
]
这篇关于ngx-smart-modal - Angular 6的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!