我使用ng-repeat
來動態獲取我的網址,並使用ng-src
通過angularjs綁定該網址。 下面的代碼ng-src沒有綁定數據
<div class="x_panel" ng-repeat="data in allreviewdata|filter:search">
<div class="x_content">
<div class=" review-panel">
<div class="row"style="margin-bottom:30px;" >
<div class="col-lg-4">
<span ng-bind="data.Channel"></span>
<span class="name_date" style="font-size:10px; font-color:#DCDCDC;" ng-bind="data.Date">date</span>
</div>
<div class="col-lg-4 pull-right"style="text-align:right;" ng-bind="data.Sentiment">
</div>
</div>
<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12" style="text-align:center;">
<img ng-src="data.pic_url" alt="logo" width="100px;"class="review-panel-logo">
</div>
但我無法得到正確的URL。我也曾使用{{data.pic_url}}
,但它給錯誤。同時其給這個錯誤
有誰能夠有這個解決方案?
在此先感謝您..!以這種方式
IMG URL路徑不正確,我想是這樣... –
@AnilKumarRam我已經給出了正確的道路。 data.channel獲得正確的值,那麼爲什麼不data.pic_url – Tarun
@Tarun,你可以在單獨的選項卡中打開** data.pic_url **值? – Natiq