September 11, 2016

How to make ngrx/store work with HMR

In my previous post, I talked of a way to develop angular 2 app with HMR. The vendors I use are @angularclass/hmr and @angularclass/hmr-loader Later on, I thought I might need a data flow tool like redux to manage my app state and I found ngrx/store @angularclass/hmr injects some hmr prefix life cycles into the main module to let you to restore the data. But app state management is optional and you can choose your own way to implement it, so I will walk you through how I implement HMR with ngrx/store ... Read more

September 3, 2016

Angular2 HMR with backend server supported

Currenly I am developing a client + server side boilerplate with Angular 2 and Feathers. For server side, I am using ts-node with nodemon, so far so good. But I find it cumbesome that every time I need to bundle client side code. After some exploring, I find a way to solve the problem. These are the dependencies: angular2-hmr a bootload wrapper on bootstrapModule, it’s cleared classified how to use in github angular2-hmr-loader, a webpack loader to work with the previous one webpack-dev-middleware, just like webpack-dev-server webpack-hot-middleware, an express/feather middleware just like webpack-dev-server w/ hot All of their READMEs clearly walk you through, it just suprises me that few information could be connected on this while it’s a quite general practice in React