PatrickJS / angular-hmr

:fire: Angular Hot Module Replacement for Hot Module Reloading
https://patrickjs.com
Apache License 2.0
506 stars 45 forks source link

reduce over default state with current state #3

Closed PatrickJS closed 8 years ago

PatrickJS commented 8 years ago

reduce over default state with current state

MarkPieszak commented 8 years ago

Yo brotha, you got the HMR working for ng2?? @gdi2290 Loaded up your ng2 starter and saw you added application state and it's holding it :)

What was the trick / missing ??

PatrickJS commented 8 years ago

the trick was using a proxy to maintain state during the refresh. I think this works now even though it was pretty hacky