Angular 5 ngx-toastr 不显示 html 消息
Angular 5 ngx-toastr not displaying html message
我正在使用 Angular 5 和 ngx-toastr。我使用了以下代码,它呈现 HTML 标记以及如下消息:Hi<b>Hello</b>
这不是预期的。
this.toastr.warning("Hi<b>Hello</b>");
此外,我使用了以下代码,它没有控制台错误,也没有任何输出(弹出窗口):
this.toastr.show("<font color=\"red\">Hi<b>Hello</b></red></font>",null,{
disableTimeOut: true,
tapToDismiss: false,
closeButton: true,
positionClass:'bottom-left',
enableHtml:true
});
如何在 ngx-toastr 中启用 HTML 以便消息看起来像:
你好你好
按照参数顺序更改您的配置,
this.toastr.show('<font color=\"red\">Hi<b>Hello</b></red></font>"',
'title' , {
enableHtml: true,
closeButton: true,
timeOut: 10000
});
我正在使用 Angular 5 和 ngx-toastr。我使用了以下代码,它呈现 HTML 标记以及如下消息:Hi<b>Hello</b>
这不是预期的。
this.toastr.warning("Hi<b>Hello</b>");
此外,我使用了以下代码,它没有控制台错误,也没有任何输出(弹出窗口):
this.toastr.show("<font color=\"red\">Hi<b>Hello</b></red></font>",null,{
disableTimeOut: true,
tapToDismiss: false,
closeButton: true,
positionClass:'bottom-left',
enableHtml:true
});
如何在 ngx-toastr 中启用 HTML 以便消息看起来像: 你好你好
按照参数顺序更改您的配置,
this.toastr.show('<font color=\"red\">Hi<b>Hello</b></red></font>"',
'title' , {
enableHtml: true,
closeButton: true,
timeOut: 10000
});