How to show image in angular 2+?

0

This code is working perfectly on another;

 <div class="col-sm-12 col-xs-12" *ngIf="is_edit && restaurant.image">
        <div class="image_for_edit">
          <img src="{{url + '/imageRestaurante/' + restaurant.image }}" />
        </div>
      </div>

But I'm using the same code on another page and the image does not appear as you can see below;

<a [routerLink]="['/restaurants', restaurant.id]">
  <div class="place-info-box">

    <div class="place-info-box-icon" *ngIf="is_edit && restaurant.image">
        <img src="{{url + '/imageRestaurante/' + restaurant.image }}" />
    </div>

    <div class="place-info-box-content">
      <span class="place-info-box-text">{{ restaurant.name }}</span>
      <span class="place-info-box-star"><i class="fa fa-star"></i> {{ restaurant.rating }} </span>
      <span class="place-info-box-detail">{{ restaurant.category }}</span>
      <span class="place-info-box-detail">{{ restaurant.deliveryEstimate }}</span>

    </div>
    <!--  <span class="place-info-box-icon"><img [src]="restaurant.imagePath" /></span>  /.info-box-content -->
  </div>
</a>

How do I get the image to be viewed on the screen?

The database I'm using is MongoDB.

This is the image;

    
asked by anonymous 14.08.2018 / 20:31

0 answers