0
我已經在img src中給出了json圖片url,但img不會加載。當我檢查從ng-src生成的url加載圖像。請幫忙。無法加載網址(角度js)
<ion-item ng-repeat="post in posts" href="#/app/post/{{post.ID}}">
<img ng-src="post.imageurl"/> {{post.title}}
</ion-item>
我已經在img src中給出了json圖片url,但img不會加載。當我檢查從ng-src生成的url加載圖像。請幫忙。無法加載網址(角度js)
<ion-item ng-repeat="post in posts" href="#/app/post/{{post.ID}}">
<img ng-src="post.imageurl"/> {{post.title}}
</ion-item>
您需要聲明的URL一樣的角度範圍變量如下
<img ng-src="{{post.imageurl}}"/>
還是老樣子不會加載 – New2Byte
使打印的URL頁面,以檢查它的正確。然後仔細檢查你正在存儲圖像的資產/ img文件夾,以確保路徑正確,甚至努力編碼它以確保你的路徑是正確的 –