angular: 段落标签中不打印换行符
angular: Newlines in are not printed in paragraph tag
我正在尝试显示“< p >”标签中文本区域的文本。
在 < p > 标记中打印输出时,换行符将被忽略。
Check following:
使用 angular 进行数据绑定
如何让
标签打印换行符?
在您的 lines class
上使用 white-space: pre;
(请注意您在 CSS 文件中遗漏了一个引用您的 class 的点。
JSF
在第 class 行中正确应用 white-space:pre-wrap;
属性。
.lines {
white-space: pre-wrap;
}
它对我有用。
我正在尝试显示“< p >”标签中文本区域的文本。 在 < p > 标记中打印输出时,换行符将被忽略。
Check following:
使用 angular 进行数据绑定
如何让
标签打印换行符?
在您的 lines class
上使用 white-space: pre;
(请注意您在 CSS 文件中遗漏了一个引用您的 class 的点。
JSF
在第 class 行中正确应用 white-space:pre-wrap;
属性。
.lines {
white-space: pre-wrap;
}
它对我有用。