1.templateUrl
.component("noData",{
templateUrl:"components/noData.html" // 注意相对路径是针对index.html的
})
2.图片路径
相对路径 相对于 index.html
<!-- 暂无数据 -->
<div class="no_data">
<!-- 本地相对路径 相对index.html -->
<img src="img/noData.png" />
<p>暂无数据</p>
</div>
<style>
.no_data{
text-align: center; /*让div内部文字居中*/
width: 200px;
height: 160px;
margin: 170px auto 0px;
}
</style>
彩蛋:
jquery 多属性选择器写法
$("input[id='XX'][class='XXX']")
.