如何在Angular 6中集成Bootstrap-Modals?

时间:2018-12-12 13:46:36

标签: html angular angular6 bootstrap-modal ng-bootstrap

我希望我的按钮在单击时打开一个模式。

这是按钮。 enter image description here

模态在页面底部打开:

enter image description here

这是我的HTML和模式代码:

enter image description here

enter image description here

这是我的component.ts:

enter image description here

我在这里指的是ng-bootstrap: https://ng-bootstrap.github.io/#/components/modal/examples

1 个答案:

答案 0 :(得分:1)

为什么在使用angular时使用bootstrap modal?有很多好的框架,例如与Angular完全兼容的Angular材料。

您可以在此处查看弹出式窗口的角材文档:

dialog in angular material

,您可以在此处看到有关角材料入门的完整文档:

angular material

将角形材料导入项目需要5分钟,强烈建议您这样做。它包含大量有用的组件。

顺便说一下,角材料是由角团队开发的,并且与角完全集成。