Angular 2 与 Bootstrap 4 一起使用的警报,类似于 Toastr

Angular 2 Alerts that work with Bootstrap 4, similar to Toastr

我正在尝试使用 Bootstrap 4 和 Angular 2 获取 toastr 样式的警报消息,而我安装的当前软件包仅适用于 Bootstrap 3。

想知道是否有人成功获得与 Angular 2 和 Bootstrap 4 一起使用的警报包?

它们都可以向屏幕发送警报并消失,但没有任何样式,因为使用了错误的 类。

我在这个项目中使用 Bootstrap 4 和 ng-bootstrap。

感谢 12seconds 上面的输入,我刚刚使用 ng2-toasty 自己解决了这个问题。

我正在使用 webpack,我假设 CSS 是自动导入的,我决定将样式表从 node_modules\ng2-toasty 复制到我自己的文件夹 assets\ng-toasty 并放入引用进入 index.html.

我的问题现在已经解决了。

<link rel="stylesheet" href="assets/ng2-toasty/style.css" />
<link rel="stylesheet" href="assets/ng2-toasty/style-bootstrap.css" />