【发布时间】:2017-10-19 04:04:06
【问题描述】:
我需要将确认对话框消息显示为 html,这就是我的对话框在组件中的外观:
this.confirmationService.confirm({
header: "Change user status",
message: "Do you want to change user status to <strong>" + status + "</strong >?",
accept: () => {
//
}
});
这就是它在页面上的样子:
我尝试了这两种方法但没有成功
<p-confirmDialog width="500" appendTo="body">
<template pTemplate="body">
<span class="ui-confirmdialog-message">{{message}}</span>
</template>
<p-confirmDialog width="500" [innerHTML]="message"></p-confirmDialog>
【问题讨论】:
-
您的 plunker 工作,但如果我将消息更改为,例如,
'Do you want to change user status to <p style="font-size:larger">' + status + '</p>?'它不再。想法?
标签: angular primeng confirmation