【发布时间】:2019-09-14 07:09:05
【问题描述】:
我想在 Angular 中格式化 XML 文件。我试过这个:
<div class="element-box">
<div class="details-wrapper">
<p><b class="label">Raw Request</b>
<pre>
{{apiattempt.raw_request | xmlBeautyfier }}
</pre>
</p>
</div>
</div>
但我收到此错误:
ERROR in : Template parse errors:
Unexpected closing tag "p". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags ("
{{apiattempt.raw_request | xmlBeautyfier }}
</pre>
[ERROR ->]</p>
<p><b class="label">Raw Response</b>{{apiattempt.raw_response | xmlBeautyfier }}</p>
</div"):
你知道我该如何解决这个问题吗?
【问题讨论】:
-
p标签可以通过使用其他标签来隐式关闭;见this问题
-
好问题 - 我不知道。
标签: html angular typescript