https://github.com/bonejon/ngrx-sample
A simple example of using ngrx for caching lookup data and maintaining a simple array of items. This includes add, remove, update and clear.
https://github.com/bonejon/ngrx-sample
angular angular2 angular7 example-code ngrx ngrx-effects ngrx-example ngrx-store rxjs
Last synced: 2 months ago
JSON representation
A simple example of using ngrx for caching lookup data and maintaining a simple array of items. This includes add, remove, update and clear.
- Host: GitHub
- URL: https://github.com/bonejon/ngrx-sample
- Owner: bonejon
- Created: 2018-12-20T16:04:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-18T12:30:20.000Z (over 7 years ago)
- Last Synced: 2025-03-02T23:27:35.560Z (over 1 year ago)
- Topics: angular, angular2, angular7, example-code, ngrx, ngrx-effects, ngrx-example, ngrx-store, rxjs
- Language: TypeScript
- Homepage:
- Size: 696 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NgrxSample Application

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.1.4.
The purpose of this project is to demonstrate a clean PoC application using angular and ngrx for state management.
There are two styles of state management in use. Within the CommonState application metadata is cached by using the
withLatestFrom pipe to determine whether the metadata exists within the state if not then a service is called to load
the data and the reducer will update the state.
The CartState uses a more traditional application flow to add, update, remove, and clear a shopping cart that could be submitted
to the server on user request.
Both states have full tests round the actions, effects, and reducers to ensure correctness and functionality.
## Installing dependencies
The project dependencies are managed by `yarn`, so ensure you have the latest version installed and run `yarn` in the root directory.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Build
For a full pipeline build including linting and testing run `npm run build`. This will build the output to the `dist/` directory with
full AOT and treeshaking.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Further help
Log a github issue within the repository [NgrxSample Application GitHub](https://github.com/bonejon/ngrx-sample/issues)