Enabling the ProgressBar in EJ 1 Angular ProgressBar
7 Jun 2017 / 1 minute to read
The ProgressBar is enabled by using the enabled Property. When this property is set to ‘false’, it disables the ProgressBar widget. By default, ‘enabled’ property is set to ‘true’ in the ProgressBar widget.
The following code explains how to disable the ProgressBar widget when enabled property is set to ‘false’.
<div class="control">
<ej-progressbar id="progressBar" [enabled]="false" [value]="val" [height]="height" [width]="width" (create)="onCreate($event)"></ej-progressbar>
</div>
import {Component} from '@angular/core';
@Component({
selector: 'sd-home',
templateUrl: 'app/components/progressbar/progressbar.component.html'
})
export class ProgressBarComponent {
val: number;
height: number;
width: number;
onCreate($event) {
var progress = $("#progressBar").data("ejProgressBar");
progress.setModel({ text: progress.getValue() + " %" });
}
constructor() {
this.val = 50;
this.height = 40;
this.width = 500;
}
}
The following screenshot displays the output for the above code.
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page