ng-http-loader is an Angular library that provides an automatic loading spinner or progress bar during pending HTTP requests. It achieves this by leveraging Angular's `HttpClient` interceptor mechanism, displaying a visual indicator whenever an active HTTP request is in progress and hiding it once all requests are complete. The current stable version is 19.0.0, which supports Angular 21. The library maintains a rapid release cadence, with new major versions typically released shortly after corresponding Angular major versions to ensure full compatibility and adopt the latest Angular features, such as standalone components, signals, and zoneless change detection. Key differentiators include its tight integration with `HttpClient`, support for various SpinKit-based loaders, and its proactive adoption of modern Angular APIs, providing a streamlined developer experience for adding visual feedback to asynchronous operations.
npm install ng-http-loaderVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to integrate `ng-http-loader` into a modern Angular standalone application, including importing the loader component and configuring the functional HTTP interceptor.
Migrate component input bindings from property binding (`[property]="value"`) to signal-based syntax or ensure you are using a compatible ng-http-loader version for your application's input style.
Replace usages of `model()` with `input()` as per Angular's signal-based input changes. Review ng-http-loader's documentation for updated input properties.
Review application code that might explicitly interact with `NgZone` or rely on specific change detection cycles related to HTTP requests. Test thoroughly after upgrading to ensure consistent behavior.
Ensure your application uses `HttpClient` from `@angular/common/http` for all HTTP requests. For standalone applications, provide `provideHttpClient` in your application config. For NgModules, import `HttpClientModule`.
Always consult the compatibility table in the README or package documentation to ensure you install the `ng-http-loader` version that explicitly supports your Angular major version (e.g., ng-http-loader v19 for Angular v21).
Install the ng-http-loader version that precisely matches your Angular major version, as detailed in the package's compatibility table (e.g., `npm install ng-http-loader@19` for Angular 21).
Ensure you are using `provideHttpClient(withInterceptors([pendingRequestsInterceptor$]))` in your `ApplicationConfig` for standalone apps, or in your `NgModule`'s `providers` array for module-based apps, and that `@angular/common/http` is correctly imported.