1
我的代码模板解析错误如下图所示:IMG SRC给出angular2
的test.html
<div class="q-img-container">
<img id="q-order-img" src="../img/ic_truck.png" alt=""></img>
</div>
但它给了我以下错误:
"Unhandled Promise rejection:"
"Template parse errors:
Void elements do not have end tags "img" ("iv class="q-img-container">
<img id="q-order-img" src="../img/ic_truck.png" alt="">[ERROR ->]</img>
</div>
我的目录结构如下:
---app
------img
----------ic_truck.png
------template
----------test.html
我在这里错过了什么?
删除结束标记 – hjm
是的,它的工作。上述有问题的线路在角度1中工作良好,为什么它在角度2中被拒绝 –