0

I'm using ng-repeat for getting my url dynamically and using ng-src to bind that url through angularjs. Here's the code

    <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>

But I was unable to get the proper url. I had also used {{data.pic_url}} but its giving error. Also its giving this error

error

Can anybody has the solution for this ?

Thank you in advance ..!

Tarun
  • 150
  • 3
  • 13

2 Answers2

0

Use in this way

<img ng-src="{{data.pic_url}}">
Kumar
  • 270
  • 1
  • 4
  • 17
0

You need to have like this,

  <div ng-controller="myCtrl">
        <img src="http://{{data.pic_url}}"/>
        <img ng-src="http://{{data.pic_url}}"/>
   </div>

DEMO

Sajeetharan
  • 216,225
  • 63
  • 350
  • 396