NgRx Examples
Angular 2 + ngrx examples, inspired by official redux examples.
##Goal
These examples illustrate how to utilize ngrx within an Angular 2 application. This repository will be actively maintained and updated as new tools (dev tools?) and functionality become available and best practices are established.
##Contributions
As Angular 2 and ngrx are relatively new, patterns and best practices are still being established. Examples found in this repository demonstrate how I (or the project author) would structure the solution but discussion and refinement is always encouraged! Please open an issue, submit a pull request, or drop me a message on twitter to present a different approach or idea. This repository will feature the most solid, agreed upon techniques as they evolve.
Please add any additional Angular 2, ngrx, or reactive programming articles, repositories, or code samples you find useful. I will keep this list as up-to-date as possible!
##Additional Resources Additional Angular 2, ngrx, and reactive programming articles, repositories, and code samples:
###Articles
- Build a Better Angular 2 Application with Redux and ngrx - Lukas Ruebbelke
- Reactive Data Flow in Angular 2 - Wayne Maurer
- Understand and Utilize the Async Pipe in Angular 2 - Brian Troncone
- Communication Between Components & Components Design - Oren Farhi
Presentations and Slides
- Reactive Angular 2 - NG-NL 2016 - Rob Wormald
- Introduction to RxJS 5 - NG-NL 2016 - Gerard Sans
- Angular 2 Change Detection Explained - Pascal Precht
- Angular 2 and the Single Immutable State Tree - Ciro Nunes
###Repositories and Code Samples
- NgRx Sample Project Utilizing Immutable and Normalizr - Cody Lundquist
- NgRx Auth Example - Sekib Omazic
- Todo with Undo/Redo - Rob Wormald
- NgRx Dev Tools First Look - Rob Wormald
- An example implementation of ngrx-store with async actions - Avi Haiat
Middleware Examples
- Store-Saga - Rx implementation of redux-saga for @ngrx/store - Mike Ryan
- NgRx Local Storage - Sync local storage with ngrx state slices - Brian Troncone
##Getting Started
# clone the repo
git clone https://github.com/btroncone/ngrx-examples.git
# cd into repo
cd ngrx-examples
# cd into project of your choice
cd counter
# install dependencies
npm install
# start the server
npm start
##Build
Project builds are a stripped down version of Angular Class Webpack Starter, an exceptional Angular 2 seed project. Tests can be executed with either WallabyJS or Karma (soon!).
##Examples
- Counter (source)
- Todos (source)
- Async (source)
- Todos with Undo/Redo (based off example) (source)
- Shopping Cart - Coming soon!
- Real World - In Progress!
- Much more to come!