PatrickJS / angular-hmr

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

Async operations on HMR fails to update the view #70

Open svvac opened 6 years ago

svvac commented 6 years ago

When doing async operations (Observable, setTimeout, ...) in a component init, the code executes as expected but the view doesn't get updated.

Reloading the component by changing route works as expected though.

Removing the this.appRef.tick() call in AppModule#hmrOnInit() seems to fix that, and so does making said call in a setTimeout().

rbudnar commented 6 years ago

Thanks for that! I had this issue with my observables as well and that seems to have resolved it.

PatrickJS commented 6 years ago

yeah, that makes sense. can you edit the readme to mention this?