PatrickJS / angular-hmr

:fire: Angular Hot Module Replacement for Hot Module Reloading

Home Page:https://patrickjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Back and forward cause route resolvers to get called one for each reload since full refresh

hahn-kev opened this issue · comments

I use route resolvers to load data when a route is navigated too, and when I click a link to take me to a route everything works just fine, the app can update a bunch and it's fine.

However, if I use the back/forward buttons in the browser to navigate then each route resolver will get called for however many times the app has been hot updated, instead of just once. I've tried to take a look at the stack traces and figure out what's different, but there's a lot of code to dig through and I'm not familiar enough with angular internals to figure out the exact issue.

It seems like route resolvers might be getting added each time a reload happens and that's causing them to stack up.