![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
ng2-progressbar
Advanced tools
A nanoscopic progress bar. Featuring realistic trickle animations to convince your users that something is happening!
Install it with npm
npm install ng2-progressbar --save
###SystemJS
If you are using SystemJS, you should also adjust your configuration to point to the UMD bundle.
In your systemjs config file, map needs to tell the System loader where to look for ng2-progressbar
:
map: {
'ng2-progressbar': 'node_modules/ng2-progressbar/bundles/ng2-progressbar.umd.js',
}
## Usage
Add NgProgressModule
to NgModule imports
array.
import { NgProgressModule } from 'ng2-progressbar';
@NgModule({
imports: [
NgProgressModule
]
})
In your template
<ng-progress></ng-progress>
Add NgProgressService
wherever you want to use the progressbar.
import {NgProgressService} from "ng2-progressbar";
@Component({
/** */
})
constructor(private pService: NgProgressService) {
}
ngOnInit(){
/** request started */
this.pService.start();
this.http.get(url).subscribe(res){
/** request completed */
this.pService.done();
}
}
NgProgressService.start()
Shows the progress bar
NgProgressService.set(n)
Sets a percentage n (where n is between 0-1)
NgProgressService.inc(n)
Increments by n (where n is between 0-1)
NgProgressService.done()
Completes the progress
<ng-progress [positionUsing]="'marginLeft'" [minimum]="0.15" [maximum]="1"
[speed]="'200'" [showSpinner]="'false'" [direction]="'rightToLeftIncreased'"
[color]="'red'" [trickleSpeed]="250" [thick]="false" [ease]="'linear'"
></ng-progress>
0.0
to 1.0
.Progress initial starting value, default 0.08
0.0
to 1.0
.Progress initial starting value, default 0.08
Progress animation ease, default linear
.
Transition speed, default 300
.
Progress trickling speed, default 300
.
leftToRightIncreased
, leftToRightReduced
, rightToLeftIncreased
, rightToLeftReduced
.Progressbar direction for LTR and RTL websites, default: leftToRightIncreased
.
marginLeft
, translate
, translate3d
.Positioning method, default: marginLeft
#1eb77f
, brown
, rgb(30, 183, 127)
.Set the progressbar color, default: #29d
Display the spinner, default: true
.
A thicker size of the progressbar, default: false
.
Toggle the progressbar (alternate to start
/done
), . default false
.
If you only need a progressbar for multiple (XHR) requests, there is a simple plug and play provider. It does the trick.
import { NgProgressCustomBrowserXhr } from 'ng2-progressbar';
@NgModule({
providers: [
{ provide: BrowserXhr, useClass: NgProgressCustomBrowserXhr } ,
],
})
<ng-progress></ng-progress>
The progress will start and complete automatically with your HTTP requests. no need to use NgProgressService
to call start()/done() manually.
If you identify any errors in the library, or have an idea for an improvement, please open an issue. I am excited to see what the community thinks of this project, and I would love your input!
## Author ## CreditsInspired by NProgress.js by Rico Sta. Cruz.
## LicenseFAQs
A slim customizable progressbar for angular2
The npm package ng2-progressbar receives a total of 0 weekly downloads. As such, ng2-progressbar popularity was classified as not popular.
We found that ng2-progressbar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.