angular-hmr icon indicating copy to clipboard operation
angular-hmr copied to clipboard

Async operations on HMR fails to update the view

Open svvac opened this issue 8 years ago • 2 comments

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().

svvac avatar Oct 27 '17 08:10 svvac

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

rbudnar avatar Nov 08 '17 16:11 rbudnar

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

PatrickJS avatar Nov 09 '17 02:11 PatrickJS