How to use click event for showing progress bar on respective item for dynamic download button


#1

Attach image below here:

I want to show progress bar for respective item using button click handler. Download is going on but progress bar not show or hide properly. After some click all progress bar is showing.

html code

<ion-grid>
  <ion-row class="file-box" *ngFor="let attach_info of event_info.event_attach">
		<ion-col col-10>
			<ion-item>
				<p><b>{{attach_info.caption}}</b></p>
				<p>{{attach_info.file_size}}</p>
			</ion-item>
		</ion-col>
		<ion-col col-2 class="btn-flex">
			<button ion-button clear small round tappable  icon-only (click)="download(attach_info.file_name, attach_info.msg = !attach_info.msg)">
				<ion-icon class="big-icon" name='ios-download-outline'></ion-icon>	
			</button>
		</ion-col>
		<div class="progress-outer" *ngIf="!attach_info.msg || progress >0">
			<div class="progress-inner" [style.width]="progress + '%'">
				{{progress}}%
			</div>
		</div>
  </ion-row>
</ion-grid>

ts file

download(file_url:any){ 
   
}