Assign current progress value

Hi Syncfusion Team,

We would like to show our users download progress using ProgressButton with [animationSettings] = "slideLeft".

Is it possible to assign value to this button to display current progress like it is in ProgressBar component?

1 Reply 1 reply marked as answer

GK Gayathri KarunaiAnandam Syncfusion Team May 15, 2021 06:23 AM UTC

Hi Ignacy, 

We have checked your reported query. We can achieve your requirement by using the Progress Button events. We have prepared a sample in which you can change the content property using percent property to display current progress. Please check the below code snippet. 

Code snippet: 
 <button ejs-progressbutton [content]='content'  [duration]='15000' (begin)='begin($event)' (progress)='progress($event)' (end)='end($event)' cssClass='e-hide-spinner'></button> 
 

private content: string = 'Progress'; 
 
  private begin(args: ProgressEventArgs): void { 
    this.content = 'Progress ' + args.percent + '%'; 
  } 
 
  private progress(args: ProgressEventArgs): void { 
    this.content = 'Progress ' + args.percent + '%'; 
  } 
 
  private end(args: ProgressEventArgs): void { 
    this.content = 'Progress ' + args.percent + '%'; 
  } 
 

For your reference, we have prepared a sample based on your requirement. Please check the below link. 


Please get back to us, if you need further assistance. 

Regards, 
Gayathri K 


Marked as answer
Loader.
Up arrow icon