Angular弹出模态框的方式
1、一、弹出方式一1.alert弹框(1)demo目录--------app.component.ts-幻腾寂埒-------app.component.html--------app.module.ts--------detail(文件夹)------------detail.component.ts------------detail.component.html(2)demo代码app.module.ts导入必要的BootstrapModalModule 和ModalModule ,再注册它们

3、detail.component.html编写alert弹框的布局

5、2.confirm弹框(1)demo目录--------app.component.ts--------app.component.html--------app.module.ts--------confirm(文件夹)------------confirm.component.ts------------confirm.component.html(2)demo代码app.module.ts导入必要的BootstrapModalModule 和ModalModule ,再注册它们,这些都跟alert弹框一样,因为这些都是方法一的弹出方式

7、app.component.ts编写这个按钮的动作showConfirm()

9、confirm.component.ts创建模态框组件

11、app.component.ts很简单,连组件的布局都不用写,传入一些参数比如图标icon,大小size等


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
阅读量:24
阅读量:49
阅读量:81
阅读量:39
阅读量:53