Angular PrimeNG ProgressBar Properties
Last Updated :
24 Sep, 2022
Angular PrimeNG is a UI component library for Angular Applications. It offers many pre-built themes and UI components for a variety of tasks like inputs, menus, charts, Buttons, etc. In this article, we will see Angular PrimeNG ProgressBar Properties.
ProgressBar Component is used to notify the user about the progress of a task. A progress bar can be of two types: determinate and indeterminate. The determinate progress bar tells the user how much progress is done while the indeterminate progress bar just indicates that some process is going on.
Angular PrimeNG ProgressBar Properties:
- value: It is the current value of the progress. It takes a number and the default value is null.
- showValue: This boolean property decides whether to show the progress bar value or not.
- unit: It defines the unit of the progress bar value. It accepts a string value. The default is “%”.
- mode: It is used to set the mode of the progress bar. It can take two values: “determinate” and “indeterminate”.
Syntax:
<p-progressBar mode="indeterminate"
unit="percent"></p-progressBar>
Creating Angular Application and Installing the Module:
Step 1: Create an Angular application using the following command.
ng new appname
Step 2: After creating your project folder i.e. appname, move to it using the following command.
cd appname
Step 3: Finally, Install PrimeNG in your given directory.
npm install primeng --save
npm install primeicons --save
Project Structure: The project Structure will look like this after following the above steps:

Project Structure
Run the below command to start the application:
ng serve --open
Example 1: In this example, we show the determinate and indeterminate modes of the progress bar.
app.component.html
< h2 style = "color: green" >GeeksforGeeks</ h2 >
< h3 >Angular PrimeNG ProgressBar Properties</ h3 >
< p-progressBar
mode = "determinate"
[value]="34">
</ p-progressBar >
< p-progressBar
mode = "indeterminate"
[style]="{'height': '10px', 'margin-top': '20px'}">
</ p-progressBar >
|
app.component.ts
import { Component } from "@angular/core" ;
@Component({
selector: "app-root" ,
templateUrl: "./app.component.html" ,
})
export class AppComponent {}
|
app.module.ts
import { NgModule } from "@angular/core" ;
import { BrowserModule }
from "@angular/platform-browser" ;
import { BrowserAnimationsModule }
from "@angular/platform-browser/animations" ;
import { AppComponent } from "./app.component" ;
import { ProgressBarModule } from 'primeng/progressbar' ;
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
ProgressBarModule
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule { }
|
Output:
Example 2: In this example, we altered the unit of the value using the unit property of the progress bar.
app.component.html
< h2 style = "color: green" >GeeksforGeeks</ h2 >
< h3 >Angular PrimeNG ProgressBar Properties</ h3 >
< p-progressBar
mode = "determinate"
[style]="{'margin-bottom': '40px'}"
unit = "percent"
[value]="25">
</ p-progressBar >
< p-progressBar
mode = "determinate"
[style]="{'margin-bottom': '40px'}"
unit = "$"
[value]="45">
</ p-progressBar >
< p-progressBar
mode = "determinate"
unit = "EUR"
[value]="65">
</ p-progressBar >
|
app.component.ts
import { Component } from "@angular/core" ;
@Component({
selector: "app-root" ,
templateUrl: "./app.component.html" ,
})
export class AppComponent {}
|
app.module.ts
import { NgModule } from "@angular/core" ;
import { BrowserModule }
from "@angular/platform-browser" ;
import { BrowserAnimationsModule }
from "@angular/platform-browser/animations" ;
import { AppComponent } from "./app.component" ;
import { ProgressBarModule } from 'primeng/progressbar' ;
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
ProgressBarModule
],
declarations: [AppComponent],
bootstrap: [AppComponent],
})
export class AppModule { }
|
Output:
Reference: http://primefaces.org/primeng/progressbar
Similar Reads
Angular PrimeNG ProgressSpinner Properties
Angular PrimeNG is an open-source library that consists of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will be seeing Angular PrimeNG ProgressSpinner Properties. ProgressSpinner Component
3 min read
Angular PrimeNG ProgressBar Static
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use the ProgressBar Static in Angular PrimeNG. We will also learn a
3 min read
Angular PrimeNG Tag Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see Angular PrimeNG Tag Properties. A tag component is used to create tags
3 min read
Angular PrimeNG ProgressSpinner Styling
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use the ProgressSpinner component in Angular PrimeNG. ProgressSpinn
3 min read
Angular PrimeNG Dock Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. It provides a lot of templates, components, theme design, an extensive icon library, and much more.
4 min read
Angular PrimeNG Menu Properties
Angular PrimeNG is an open-source library that consists of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will see Angular PrimeNG Menu Properties. The Menu component is used to navigate the
4 min read
Angular PrimeNG ProgressBar Dynamic
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. This article will show us how to use the ProgressBar Dynamic in Angular PrimeNG. We will also learn
3 min read
Angular PrimeNG Steps Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will learn how to use the Steps Properties in Angular PrimeNG. We will also lear
3 min read
Angular PrimeNG Panel Properties
Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will know the different properties of the Panel component in Angular PrimeNG. P
4 min read
Angular PrimeNG Badge Properties
Angular PrimeNG is an open-source library that consists of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will be seeing Angular PrimeNG Badge Properties. The Badge Component is used as an i
3 min read