寫(xiě)法
使用ng-src宇挫,可以加載base64/圖片網(wǎng)絡(luò)路徑/圖片相對(duì)路徑...
<img ng-repeat="x in img" ng-src="{{x.source}}">
注意事項(xiàng)
<!--這是一種寫(xiě)法伸头,取出x的source(圖片)-->
<img ng-repeat="x in img" ng-src="{{x.source}}">
If you have just an array of images
<!--直接循環(huán)圖片集合氏捞,必須加track by $index,否則不報(bào)錯(cuò)但是加載不出來(lái)-->
<img ng-repeat="img in images track by $index" ng-src="{{img}}">