Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230801

Automatically click

$
0
0

I receive with Ionic storage an array of object, I display each object in each ion-card element, and with my div I’m trying to create Storage space for each object I receive with HISTO_N as key.

here is my function to receive data in my array :

getData() {
this.storage.get(this.getParameter()).then((val) => {
  if (val != null && val !== undefined ) {
    this.items = val;
    this.items.push(val);
  }
});

}

Here I display data of each object in ion-card

<ion-card (click)="showInter(item.HISTO_N, item.HISTO_Comm1, item.HISTO_Titre, item.L4_Livraison, item.HISTO_Objet2)" *ngFor="let item of items">

<!--<p>{{save(item.HISTO_N, item.HISTO_Comm1, item.HISTO_Titre, item.L4_Livraison, item.HISTO_Objet2)}}</p>-->
 <div id="clickDiv" #divSave (click)="save(item.HISTO_N, item.HISTO_Comm1, item.HISTO_Titre, item.L4_Livraison, item.HISTO_Objet2)">save</div>


</ion-card

I would like a Storage space for each ion-card content with HISTO_N as key

My save function :

save(HISTO_N, HISTO_Comm1, HISTO_Titre, L4_Livraison, HISTO_Objet2) {
let d = {
  com : HISTO_Comm1,
  titre : HISTO_Titre,
  livr : L4_Livraison,
  obj : HISTO_Objet2
};
this.storage.set(HISTO_N, d);

}

Thanks


Viewing all articles
Browse latest Browse all 230801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>