Javascript 在AngularJS中的toastr消息中添加换行符(换行符)?
我用这个在AngularJS网站上显示祝酒词。我需要知道如何将换行符(Javascript 在AngularJS中的toastr消息中添加换行符(换行符)?,javascript,angularjs,toastr,Javascript,Angularjs,Toastr,我用这个在AngularJS网站上显示祝酒词。我需要知道如何将换行符()放入正文中。当我使用本文中显示的选项时,toastr在屏幕上呈现标记,而不是将其解释为HTML。如何将换行符转换成吐司?有两种方法允许在吐司中使用一些HTML标记,包括换行符 在烤面包机选项中包括'body-output-type':'trustedHtml': <toaster-container toaster-options="{ 'closeButton': false, 'debug': fa
)放入正文中。当我使用本文中显示的选项时,toastr在屏幕上呈现标记,而不是将其解释为HTML。如何将换行符转换成吐司?有两种方法允许在吐司中使用一些HTML标记,包括换行符
在烤面包机选项中包括'body-output-type':'trustedHtml'
:
<toaster-container toaster-options="{
'closeButton': false,
'debug': false,
'position-class': 'toast-bottom-right',
'onclick': null,
'showDuration': '200',
'hideDuration': '1000',
'timeOut': '5000',
'extendedTimeOut': '1000',
'showEasing': 'swing',
'hideEasing': 'linear',
'showMethod': 'fadeIn',
'hideMethod': 'fadeOut',
'body-output-type': 'trustedHtml'
}"></toaster-container>
toaster.pop('success', 'Saved', 'Saved<br/>it!', 3000, 'trustedHtml');
或
toaster.pop({
键入:“成功”,
标题:“已保存”,
文本:“已保存
它!”,
bodyOutputType:“trustedHtml”
});
toaster.pop({
type: 'success',
title: 'Saved',
text: 'Saved<br/>it!',
bodyOutputType: 'trustedHtml'
});