2

This is the code that I am using to get images:

<img ng-src="{{url}}{{product.image}}" class="product-image">

But it wont fetch the image.

it only gets the file path but not the product image name.

Pankaj Parkar
  • 134,766
  • 23
  • 234
  • 299
Ryan Byrne
  • 21
  • 3

3 Answers3

4

The correct syntax should be

<img ng-src="{{url + product.image}}" class="product-image">
Pankaj Parkar
  • 134,766
  • 23
  • 234
  • 299
1

I think you are missing the "/" with url/image try with src instead of ng-src

<img src="{{url}}/{{product.image}}" class="product-image">
Shashi
  • 1,112
  • 2
  • 17
  • 32
0

Do you tryed to show in console the result of the variables url and product.image?

console.log(url + product.image);

The value is correct?

Paulo Teixeira
  • 448
  • 5
  • 11