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 am 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 view the image on screen?
The database I’m using is Mongodb.
This is the picture;
Shows the value of the url...
– thxmxx
<div class="place-info-box-icon" *ngIf="is_edit && restaurant.image">
{{url + '/imageRestaurante/' + restaurant.image }}</div>
– thxmxx
@thxmxx ei ai note, is doing well hey!! thank you very much was because the url was like
undefined
, actually it had to pick from the target URL, I just set it and it worked perfectly, thank you very much, ball show.– wladyband
The same logic https://answall.com/questions/319515/importa-style-react-native/319532#319532
– novic