I'm trying to display my fetched remote data, from IonicPage to template view using ng-repeat.
How to display my fetched remote data into ionic html view?
Running Ionic-4. I’ve tried to log fetched remote data, web call is ok. It seems template-view load before fetched-remote-data.
1 - Following method load data
public onLoadData(){
this.http.get(this.cfg.fetchPlatformUrl()).subscribe((data: any) => {
this.remoteData = data;
});
}
2 - Following method get data from IonicPage variable
public getRemoteExerciseData(){
return this.exerciseVideos;
}
3 - its template view code does not listing as i expected.
<ion-list>
<ion-list-header>
<ion-label>
<b>Exercise List</b></i>
</ion-label>
</ion-list-header>
<!-- START - ISSUE IDENTIFIER -->
<ion-item ng-repeat="ex in getRemoteExerciseData()">
Video 1
<ion-chip color="success">
<ion-label>V</ion-label>
<ion-icon name="happy" color="success"></ion-icon>
</ion-chip>
<ion-chip color="danger">
<ion-label>X</ion-label>
<ion-icon name="sad" color="danger"></ion-icon>
</ion-chip>
</ion-item>
<!-- END - ISSUE IDENTIFIER -->
</ion-list>
I expect see the list of fetched remote data, but the actual template view show only one.