Introduce delay and expand path matching on Backoffice router for lazy-loaded routes #19409
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The cases described here fixes an issue that only appeared on an actual server. these can be seen on a local server by running with

disabled cache
and a network throttling like this:This fixes two things:
A.
Fixes so a deep link does not just redirect to the root of a section, typically
section/settings
— this is resolved by using pathMatch 'full', a feature of the router slot we have not utilized previously.B.
Fixes so the initial empty path load does not go to section/settings, just because it loaded slightly before the content section. This is done by introducing a feature that makes redirects await a delay, the delay will be reset everytime a new route appears, making it able to extend the time as long as routes are getting registered within the given delay. And then the delay is calculated based on the browsers assumption on the internet speed. That's a guess but better than none.