Giter VIP home page Giter VIP logo

ngrx-tour-of-heros's Introduction

NgRx Tour of Heroes

The purpose of this repository is to create an example Tour of Heroes application using Angular along with NgRx.

Install

Run cd client then yarn install to install the Angular client dependencies.

Run cd server then yarn install to install the server dependencies.

Serve

Run cd server then ng serve for the Angular client. Navigate to http://localhost:4200/.

Run cd client thenyarn run serve for the REST API server.

Branches

There are several branches that capture the state of the application at different times.

antipatterns

This branch implements several anti-patterns of RxJS which can be cleaned up through the use of various operators as well as improved subscription management.

start

This branch is a good place to start if you are learning to implement NgRx in an existing application. The application is built entirely using Angular and RxJS without NgRx. There are a few bugs in the application due to the need to implement communication between containers (views). For example, when adding a new super power, the power is persisted to the server but the index view is not updated with the new list of power objects. This is one example where the use of the Redux pattern can provide consistent behavior in our application.

ngrx-refactor-1

This branch includes the first refactor of our application to implement the Redux pattern using NgRX. The power model is used throughout our application, in both the heroes module as well as in the powers module. As such, we implement the cross-cutting concern in the CoreModule of our application, which is imported into the AppModule.

ngrx-refactor-2

This branch includes:

  • Refactor of the PowersModule to use NgRx
  • Minor updates to the UI of the application
  • Created 20 new Karma tests
  • Including .travis.yml to run our tests on Travis CI

ngrx-tour-of-heros's People

Contributors

blove avatar

Watchers

James Cloos avatar Ahmed dessouki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.