问题描述
我正在我的angular 9项目中使用pre标签显示XML响应。我想显示每一行的编号。
<pre lang='xml'>{{data}}<pre>
我有XML作为来自http请求的字符串响应。
我的数据是
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
预期输出为
1<note>
2 <to>Tove</to>
3 <from>Jani</from>
4 <heading>Reminder</heading>
5 <body>Don't forget me this weekend!</body>
6</note>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)