Loading Bar

fuse-loading-bar is a small component to show the loading status at the top of the page. It can be configured to the Auto Mode to show/hide automatically on each HTTP request. It can also be toggled manually using its service.

Exported as: fuseLoadingBar

Module

Usage

Here's the basic usage of the fuse-loading-bar. We already placed the component to the layout templates for you but you can always move it!

Properties

Name Description Default
@Input()
autoMode: boolean
Turn on or off the Auto Mode. true

Service

FuseLoadingService can be injected to control the loading bar from anywhere.

show(): void;
Shows the loading bar
hide(): void;
Hides the loading bar
setAutoMode(value: boolean): void;
Sets the Auto Mode. In Auto mode, loading bar will show when there is an HTTP request and it will hide when all HTTP requests are completed or failed.
setMode(value: 'determinate' | 'indeterminate'): void;
Sets the mode of the underlying MatProgressBar component.
setProgress(value: number): void;
Sets the progress manually. Only available on determinate mode.

Examples

Show / hide the loading bar manually
Toggle the Auto Mode
Auto Mode
API call status: {{apiCallStatus}}
Manually set the progress
Toggle determinate mode
Progress value