How to fetch the image from webservice in to ionic application


#1

the json data i got from web service is /sites/default/files/2017-11/01.jpg"


#2

Just bind the URL with the ImgUrl you’ve stored. That will work then


#3

it is displaying in browser it is not displaying in mobile

this is my .hml code



<button ion-button color=“color3”
*ngIf=“slideIndex < slides.length - 1"
class=“skip-button”
(click)=“skip()”>SKIP




<ion-slides #slider pager=“true” autoplay=“3000” (ionSlideWillChange)=“onSlideChanged()”>
<ion-slide *ngFor=“let slide of slides"
class=“slide-background”
[ngStyle]=”{‘background-image’: ‘url(’ + slide.imageUrl +’)’}”>



<h2 class=“slide-title” [innerHTML]=“slide.title”>

<p [innerHTML]=“slide.description”>



Let's go!
---------------------------- .ts file

slides = [
{
title: ‘Welcome to Our VENETIAN VILLAGE’,
imageUrl: ‘http://geohyperspot.com//sites/default/files/2017-11/01.jpg’,
//description: ‘Proin interdum dapibus odio, eget maximus nunc aliquet in. In luctus leo ut ipsum gravida feugiat. Pellentesque pretium massa arcu, in tempor ligula interdum faucibus. Pellentesque ut tellus ante. Donec egestas augue a tellus porttitor, id euismod lectus tempor.’,
},
{
title: ‘Abu Dhabis Newets Dinning Destination’,
imageUrl: ‘http://geohyperspot.com//sites/default/files/2017-11/03.jpg’,
//description: ‘Take a look at our amazing options’,
},
{
title: ‘The VIBE’,
imageUrl: ‘http://geohyperspot.com//sites/default/files/2017-11/02.jpg’,
//description: ‘Take a look at our amazing options’,
}

];