How to pass the entire div on click


#1

hello guys,

I am stuck at issue to passing the entire div on click to ts.

<ion-buttons (click)=“saveStripe(scheduleCard)” end>
Save

on the click of saveStripe I want to pass the entire div to my ts file for further processing. but it shows undefined… Any one with a solution how I pass this div on click of save button…


#2

Could you please show us some (formatted) code? Little bit hard to tell what’s going on without it. Could you also elaborate a little bit about why you want to pass an entire div?


#3
<ion-buttons (click)="saveStripe(scheduleCard)"  end>
      <button class="mycollections_edit_button">Save</button>
    </ion-buttons>

this is a button in header portion of my ionic


  <div #scheduleCard *ngFor="let slide of colors.data" class="stripes" >
      <img (click)="splitItem(slide)" src="{{ slide.src }}">
      <div class="icon_div" (click)="addImage(slide)">
           <ion-icon name="ios-add-circle-outline"></ion-icon>
      </div>
  </div>

on click of save button in header I want to pass this div to my ts file and convert this to canvas for taking picture of this…
actually the basic idea is to convert this div into image and save it to mobile photo album


#4

If you have any better solution please help me follow that @luukschoen