Angular - Detect if stored components have been reattached or detached

Viewed 205

I implemented a custom route strategy (more or less copied, see here) to cache already visited routes. Now I want to detect if a component inside a cached route has been reattached or detached.

For example: I want to resume a video inside a component if a cached route has been reattached.

Basically I can compare the route on which it has been initialized and subscribe to route changes. But I am currently struggling on how to implement this the best possible way because this seems to be implemented in every component.

I was looking for Lifecycle Hook methods but it seems that none of them are executed on my route strategy.

0 Answers
Related