I bring the information of a json
that I generate with firebase, and I print it with a ngFor
, but it always prints the arrangement from the first to the last one, I would like to do it the opposite.
This is how I get the data
obtenerdatos(){
return this.http.get('https://informacion.json');
}
ionViewDidLoad(){
this.proveedor.obtenerdatos()
.subscribe(
(data)=> {this.rutas = data;},
(error)=>{console.log(error);}
)
}
Here I show you:
<ion-card *ngFor="let ruta of rutas">
<img src="{{ruta.tarjeta}}">
<ion-item>
<ion-icon name="pin" item-start large></ion-icon>
<h2>Punto de encuentro:</h2>
<p>{{ruta.puntodeencuentro}}</p>
</ion-item>
<ion-item>
<ion-icon name="calendar" item-start large></ion-icon>
<h2>Fecha:</h2>
<p>{{ruta.fecha}}</p>
</ion-item>
</ion-card>