johnpapa/angular-ngrx-data sits at 967 stars on GitHub, written primarily in TypeScript. Angular with ngRx and experimental ngrx-data helper
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This repository is now merged with @ngrx into @ngrx/data. You can find the ngrx/data docs here and the github repository with ngrx/data in it here
Please read the note above
Zero Ngrx Boilerplate
You may never write an action, reducer, selector, effect, or HTTP dataservice again.
NgRx helps Angular applications manage shared state in a "reactive" style, following the redux pattern.
But to use it properly requires both a deep understanding of redux/ngrx and a lot of boilerplate code.
Ngrx-data is an ngrx extension that offers a gentle introduction to ngrx/redux without the boilerplate.
Try it! See the Quick Start for instructions on adding NgRx and ngrx-data to your app.
Why use ngrx-data?
Many applications have substantial domain models with 10s or 100s of entity types
such as Customer, Order, LineItem, Product, and User.
In plain ngrx, to create, retrieve, update, and delete (CRUD) data for every entity type is an overwhelming task. You're writing actions, action-creators, reducers, effects, dispatchers, and selectors as well as the HTTP GET, PUT, POST, and DELETE methods for each entity type.
In even a small model, this is a ton of repetitive code to create, maintain, and test.
The ngrx-data library is one way to stay on the ngrx path while radically reducing the "boilerplate" necessary to manage entities with ngrx.
It's still NgRx
This is a library for ngrx, not an ngrx alternative.
It's easy to combine standard ngrx with ngrx-data.
It's easy to take control when you need it and hand control back to ngrx-data when you're done.
Every entity has its own actions. Every operation takes its unique journey through the store, reducers, effects, and selectors. You just let ngrx-data create these for you.
You can add custom store properties, actions, reducers, selectors, and effects. You can override any ngrx-data behavior for an individual entity type or for all entities.
You can make your own calls to the server and update the cached entity collections with the results using ngrx-data cache-only actions.
You can see the ngrx machinery at work with the redux developer tools. You can listen to the flow of actions directly. You can intercept and override anything ... but you only have to intervene where you want to add custom logic.
Learn about it
For a hands-on experience, try the QuickStart
in the tutorial git repo, ngrx-data-lab,
which guides you on the few, simple steps necessary to migrate from a typical service-based Angular app, to an app that manages state with ngrx-data.
Thisngrx-data repository has the main documentation and its own sample app.
The sample app in the src/client/app/ folder presents an editor for viewing and changing Heroes and Villains.
The following reduced extract from that demo illustrates the essential mechanics of configuring and using ngrx-data.
You begin with a description of the entity model in a few lines of metadata.
// Metadata for the entity model
export const entityMetadata: EntityMetadataMap = {
Hero: {},
Villain: {}
};
// Help ngrx-data pluralize entity type names
// because the plural of "Hero" is not "Heros"
export const pluralNames = {
Hero: 'Heroes' // the plural of Hero
};
You register the metadata and plurals with the ngrx-data module.
As you explore ngrx-data and its documentation,
you'll learn many extension points and customizations that
tailor the developer experience to your application needs.
QuickStart
Try the Quick Start to experience NgRx and ngrx-data in your app.
Explore this repository
This repository contains the ngrx-data source code and a
demonstration application (the "demo app") that exercises many of the library features.
The key folders in this repository are:
docs --> the docs for the library and the demo
lib ---> the ngrx-data library source code that we publish to npm
src/app ---> the demo app source
server ---> a node server for remote data access
Learn more in the docs
Quick Start
Architecture
Entity Metadata
Entity Collection
Entity Collection Service
Entity Services
Entity DataService
Entity Actions
Entity Reducer
Entity Change Tracker
Saving multiple-entities at once
Extension Points
Limitations
FAQ: Frequently Asked Questions
Install and run
The demo app is based on the Angular CLI. You may want to install the CLI globally if you have not already done so.
npm install -g @angular/cli
Then follow these steps:
Clone this repository
git clone https://github.com/johnpapa/angular-ngrx-data.git
cd angular-ngrx-data
Install the npm packages
npm install
Build the ngrx-data library
npm run build-setup
Serve the CLI-based demo app
ng serve -o
Refer to the troubleshooting section if you run into installation issues.
Run the library tests
The ngrx-data library ships with unit and E2E (end-to-end) tests to validate functionality and guard against regressions.
These tests also demonstrate features of the library that are not covered in the demo app. They're worth reading to discover more advanced techniques.
Run this CLI command to execute the unit tests for the library.
ng test
Run the sample app E2E (end-to-end) tests.
npm run e2e
We welcome PRs that add to the tests as well as those that fix bugs and documentation.
Be sure to run these tests before submitting a PR for review.
Monitor the app with Redux DevTools
The demo app is configured for monitoring with the Redux DevTools.
Follow these instructions to install them in your browser and learn how to use them.
Debug the library in browser dev tools
When running tests, open the browser dev tools, go to the "Sources" tab, and look for the library files by name.
In chrome, type [Command-P] and letters of the file name.
When running the app (e.g., with ng serve), the browser dev tools give you TWO choices for a given TypeScript source file, both claiming to be from .ts.
The one you want for library and app files ends in /lib/src/file-name.ts and /src/client/app/path/file-name.ts respectively.
Hope to solve the two file problem.
Build the app against the source
The demo app is setup to build and run against the ngPackagr artifacts in dist/ngrx-data,
the same artifacts delivered in the npm package.
Re-build the library npm run build-lib or npm run build-setup or npm run build-all
to update these artifacts.
This approach, while safe, can be inconvenient when you're evolving the library code because
"Go to definition" takes you to the d.ts files in dist/ngrx-data rather than
the source files in lib/src.
If you want to "Go to definition" to take you to the source files,
make the following *temporary changes to the TypeScript configuration.
Replace the paths target in the root tsconfig.json so that the IDE (e.g., VS Code) looks for ngrx-data in src/lib.
"paths": {
"ngrx-data": ["lib/src"]
},
Replacethat same setting in the config at src/tsconfig.json.
Replacethat same setting in src/client/tsconfig.app.json.
Now ng build references src/lib when it builds the demo app.
Remember to restore the tsconfig settings when you're done. Do not commit those changes!
Use a real database
The demo app queries and saves mock entity data to an in-memory database with the help of the
Angular In-memory Web API.
The "Remote Data" toggle switch in the header switches
to the remote database.
The app fails when you switch to the remote database.
Notice how the app detects errors and pops up a toast message with the failed ngrxAction.type.
The error details are in the browser's console log.
You must first set up a database and launch a web api server that talks to it.
The src/server folder has code for a local node web api server, configured for the demo app.
TODO:
Explain how to build and run the server.
Explain how to build and serve the mongo db
Bad/surplus npm scripts
We know there are a great many npm script commands in package.json, many (most?) of which don't work.
They're on our list for future cleanup.
Please don't create issues for them
(although PRs that fix them are welcome).
Troubleshooting
Installation
If you are on Windows and run into this error during npm install: "snyk couldn't patch the specified vulnerabilities because gnu's patch is not available", refer to this issue for the fix. In short, your Git installation is not correct or C:\Program Files\Git\usr\bin (typically) is not added to your system environment variable %PATH%.
How active is development on johnpapa/angular-ngrx-data?
The most recent commit recorded on johnpapa/angular-ngrx-data was 3.8 years ago, based on the GitHub push timestamp. The repository has 125 forks — one of the better signals of community interest.
How many stars does johnpapa/angular-ngrx-data have?
johnpapa/angular-ngrx-data has 967 GitHub stars — refresh the page for the live number, or check github.com/johnpapa/angular-ngrx-data. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is johnpapa/angular-ngrx-data open source?
Yes — johnpapa/angular-ngrx-data ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/johnpapa/angular-ngrx-data.
What else is in the Frontend space?
johnpapa/angular-ngrx-data is tracked by TopGit under the Frontend category, alongside 3 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is johnpapa/angular-ngrx-data?
johnpapa/angular-ngrx-data (johnpapa/angular-ngrx-data) is a TypeScript project on GitHub. From the project's own README: Angular with ngRx and experimental ngrx-data helper
What language is johnpapa/angular-ngrx-data written in?
johnpapa/angular-ngrx-data is written primarily in TypeScript. GitHub's language field is based on the largest share of bytes in the default branch.
What license does johnpapa/angular-ngrx-data use?
johnpapa/angular-ngrx-data is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about johnpapa/angular-ngrx-data?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/johnpapa/angular-ngrx-data is the definitive source.
Read full README in the tab above.
Curious whether angular-ngrx-data is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about angular-ngrx-data.