Komal K.
Komal K.

Reputation: 480

400 (Bad Request) in image url angular js

ImageUrl/{{product.thumb_vImage}} 400 (Bad Request)

I getting above error in my console; I want to know the reason of it.

<div class="img" ng-repeat="product in products| orderBy : sort_by |limitTo:limit track by $index " >
  <a ng-click="displayProduct(product)" data-toggle="modal" data-target="#modal_product"> 
      <img class="image_{{product.iProductID}}" src="{{product.thumb_vImage}}" alt="">
      <div class="overlay"></div>
  </a>
</div>

Upvotes: 3

Views: 504

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222582

It should be like this use {{}} instead of [[]] also ng-src instead of src,

   <img class="image_{{product.iProductID}}" ng-src="{{product.thumb_vImage}}" alt="">

Upvotes: 3

Related Questions