Road guards (canactivate, etc.)

Road guards (canactivate, etc.)

By medeb | personalblog | 11 Jun 2025


1. Road guards (canactivate, etc.):
If you have guards who protect the previous road, they could block access during rear navigation, potentially without displaying clear error to the user, leaving an empty page or unexpected redirection.
2. State management problems:
Spas often depend on the customer side state (loaded data, form of forms, etc.). Navigating back does not automatically restore the internal condition of the component as it was when you left it. If the component depends on data that is not recharged or restored correctly when reset, it may appear empty or incomplete.
3. Asynchronous data loading:
If the data load component from an API in Ngoninit or another lifestyle hook, and there is an error during this specific load after a rear navigation, the component may not display the expected data.

452c71b58c123255a4bb22a139a6a21e5e3de67aff93648fecc21b866ba4a2f6.png

How do you rate this article?

4



personalblog
personalblog

My daily experience in crypto world

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.