ngx-data-loader
Advanced tools
Comparing version 2.0.2 to 2.0.3
{ | ||
"name": "ngx-data-loader", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"peerDependencies": { | ||
@@ -5,0 +5,0 @@ "@angular/common": "^14.1.0", |
# NgxDataLoader | ||
Async data container component for Angular 14+. | ||
Lightweight Angular 14+ component that loads async data, handles errors and switches templates based on loading state. | ||
<hr> | ||
[![Build status](https://img.shields.io/github/workflow/status/rensjaspers/ngx-data-loader/Tests)](https://github.com/rensjaspers/ngx-data-loader/actions/workflows/main.yml) | ||
@@ -15,13 +13,15 @@ [![NPM version](https://img.shields.io/npm/v/ngx-data-loader.svg)](https://www.npmjs.com/package/ngx-data-loader) | ||
Most async data loading is done the same way: show a loading indicator while the data is loading, then show the data when it's loaded, or show an error message or a retry button if the data failed to load. | ||
Most async data loading is done the same way: show a loading indicator while the data is being retrieved, then show the data when it's loaded, or show an error message or a retry button if the data failed to load. | ||
The `NgxDataLoaderComponent` makes this easy. You only need to provide a `getDataFn` that returns a `Promise` or `Observable` with the data, and the `data`, `skeleton` and `error` templates. The component will handle all of the logic for you. | ||
While this seems simple, getting the logic right can be challenging, especially when error handling or data reloading is involved. | ||
Features: | ||
The `NgxDataLoaderComponent` makes it easy. You only need to provide a `getDataFn` that returns a `Promise` or `Observable` of the data, and the `data`, `skeleton` and `error` templates. The component will handle all of the logic for you. | ||
## Features | ||
- Bring your own template for each loading state | ||
- Automatic template switching based on the loading state | ||
- Configure auto retry and timeout | ||
- Automatic template switching | ||
- Configurable auto retry | ||
- Easy manual retry/reload | ||
- Cancel ongoing requests on component destroy or on reload | ||
- Automatic cancellation of ongoing http requests on reload/destroy | ||
@@ -28,0 +28,0 @@ ## Demo |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116588