Library for managing Loading/Success/Error in Angular applications that use NgRx.
This repository contains an Angular library ngx-view-state and a small demo application showing how to use it. The library helps manage view states (Loading, Success, Error, Idle) in applications that use NgRx for state management.
For more information about the library, please refer to the library documentation
Run npm run build-lib watch to build the library.
Run npm run start for a dev server for the Application. Navigate to http://localhost:4200/
The demo in src/app uses the library with an NgRx store. TodosEffects demonstrates how to register actions with ViewStateActionsService so that load/add/update/delete actions update the view state automatically.
The TodosComponent selects view states via selectors (selectTodosViewStatus, selectActionsLoading) and displays content with *ngxViewState.