I'm trying to take advantage of a custom RouteReuseStrategy and for that I'd like to suspend any subscriptions when a component is detached and other things like scrolling to the proper position.
I've checked for possible hooks, but apparently no additional lifecycle hooks have been added and OnDestroy isn't called.
I tried to add my own onDetach and onAttach hooks, but neither the ActivatedRouteSnapshots nor the DetachedRouteHandle will give me the instance of the current component (just the prototype?).
The only way I could get a grip on the component instance when navigating away by using the CanDeactivate guard, but that doesn't seem right. And I still couldn't find a way to add a hook for onAttach.
So my question is, how can I properly suspend a component when detached and resume it when attached ?
There used to be a OnActivate hook-interface in @angular/router, but that seems to be gone and I didn't see any replacement.
P.S. there seem to some reports of Angular apps with custom RouteReuseStrategies slowing down when used for extended time, probably because there is no way to pause/resume components.