I want ot get all ngfor value in onclick

I want ot get all ngfor value in onclick.
below my html code

 <ion-card *ngFor="let item of items">
   <ion-card-content>
   <video width="100%" controls="" poster="assets/imgs/poster.jpg">
  		<source src="{{item._meta_gallery_images}}"  type="video/mp4">
   </video>
  <ion-grid>
  <ion-row>
    <ion-col  col-6>
      1 of 2
    </ion-col>
     <ion-col col-6>
     <ion-icon name="share" class="size" color="share" (click)="shareforall($event , item)"></ion-icon>
     <ion-icon name="download" class="size" (click)="download()"></ion-icon>
     <ion-icon name="logo-facebook" class="size" color="facebook" (click)="facebookShare($event , item)"></ion-icon>
     <ion-icon name="logo-whatsapp" class="size" color="whatsapp" (click)="whatsAppSahre($event , item)"></ion-icon>
    </ion-col>
  </ion-row>
</ion-grid>
</ion-card-content>
 </ion-card>

Iā€™m trying to take the value in this way
Below my .ts

	public shareforall(event,item){
		let a = item;
		alert(JSON.stringify(a));
   
        this.socialSharing.share(
    	
    	)
       .then(() => {

        })
      .catch(() => {

      });

	}

showing an error value is undefine.
How can i do that please guide me
Thanks

Hi@flycoders_sourav
are you looping json array?
anyway there is no problem in ngFor.Please print items on

shareforall(event,item){
console.log(item);
}
and why should you use
 public infront of method shareforall,its not needed ,
remove public infront of that method```
1 Like

Great. now its working fine.Thanks for saving my day

1 Like