Skip to content

Global config (legacy)

Murhaf Sousli edited this page Aug 18, 2024 · 1 revision

You can override the default config for all progress bars in NgProgressModule.

Example:

import { NG_PROGRESS_CONFIG} from 'ngx-progressbar';

bootstrapApplication(AppComponent, {
  providers: [
    {
      provide: NG_PROGRESS_CONFIG,
      useValue: {
        trickleSpeed: 200,
        min: 20,
        meteor: false
      }
    }
  ]
})

NgProgressConfig interface

Name Default Description
direction ltr+ Progress bar direction (ltr+, ltr-, rtl+, rtl-).
trickleSpeed 300 Progress trickling speed in ms.
trickleFunc Function A function that returns the trickling amount.
debounceTime 0 Debounce time before starting the progress bar in ms.
speed 200 Transition speed in ms.
min 8 Progress initial starting value.
max 100 Progress maximum value.
ease linear Progress ease function.
spinner true Display spinner.
spinnerPosition right Spinner position. (right, left).
color #1B95E0 Progress bar color.
thick false A thicker size of the progress bar.
fixed true Progress bar fixed position.
meteor true Meteor style.
Clone this wiki locally