npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@billnice/request-progress-bar

v1.1.2

Published

Get ready for an amazing request progress bar experience in your Angular apps! Simply add our component to your root component and watch as it automatically listens to all requests with its built-in interceptor. No manual triggers needed. Emulate the seam

Downloads

3

Readme

Request Progress Bar

A fully customizable and easy-to-use request progress bar for your Angular applications. The package works by listening to all incoming requests via an HTTP interceptor, and displays the loading state to your users.

Author

Bill Nice

Features

  • Customizable bar color
  • Automatically starts working when added to your root component
  • Option to set loading state manually
  • Animated transitions for a more user-friendly experience

Demo

You can see a demo of the Request Progress Bar component here.

Screenshots

Request Progress Bar

Works best with

  • Angular 15+

Installation

You can install the request-progress-bar package using npm:

npm i @billnice/request-progress-bar

Usage

To use the Request Progress Bar component, you can add the request-progress-bar component to your root component, for example:

@Component({
  selector: 'app-root',
  template: `
    <request-progress-bar [barColor]="'#ff0000'"></request-progress-bar>
    <router-outlet></router-outlet>
  `,
})
export class AppComponent {}

Make sure to include the RequestProgressBarModule in your AppModule:

import { RequestProgressBarModule } from '@billnice/request-progress-bar';

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, RequestProgressBarModule],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}

In the example above, the Request Progress Bar component is included in the root component and the color is set to red.

Options

The Request Progress Bar component has the following options:

  • barColor: The color of the progress bar. Default value is #ff0000.
  • isLoading: a boolean that controls the state of the progress bar.

Customizing the Progress Bar Color

You can customize the color of the progress bar by setting the barColor input property. For example:

    <request-progress-bar [barColor]="'#00ff00'" ></request-progress-bar>

In the example above, the color of the progress bar is set to green.

Manually Setting the Loading State

You can manually set the loading state of the progress bar by setting the isLoading input property. For example:

    <request-progress-bar [isLoading]="true"></request-progress-bar>

In the example above, the progress bar is set to the loading state. You can set this property to another dynamic value to control the loading state of the progress bar.

Conclusion

The Request Progress Bar component is a convenient and easy-to-use solution for showing the progress of HTTP requests in your Angular application. With its built-in interceptor and customizable progress bar color, you can easily integrate it into your application and start using it right away.