馃殌 feature request
Relevant Package
This feature request is for @angular/router
Description
When using routerLink fragment to scroll to an anchor it might not work properly if unless the element is already loaded (this might be the case for a component that is rendered once data from a API has been loaded)
Another problem is that the anchor might be pushed down in the viewport when data is loaded.
A simple example: https://angular-7fpprl.stackblitz.io/qwe#qwe
Describe the solution you'd like
Perhaps there should be some wait mechanism in place that waits for the element to be rendered? I assume it would also need have a configurable timeout setting.
Also if the anchor is pushed down by dynamic content then perhaps position should be updated?
Describe alternatives you've considered
One option might be to create a custom directive that checks if the element exsists and then scrollIntoView() but it feels like monkey patching a feature that should be handled by the router
馃殌 feature request
Relevant Package
This feature request is for @angular/routerDescription
When using routerLink fragment to scroll to an anchor it might not work properly if unless the element is already loaded (this might be the case for a component that is rendered once data from a API has been loaded)
Another problem is that the anchor might be pushed down in the viewport when data is loaded.
A simple example: https://angular-7fpprl.stackblitz.io/qwe#qwe
Describe the solution you'd like
Perhaps there should be some wait mechanism in place that waits for the element to be rendered? I assume it would also need have a configurable timeout setting.
Also if the anchor is pushed down by dynamic content then perhaps position should be updated?
Describe alternatives you've considered
One option might be to create a custom directive that checks if the element exsists and then scrollIntoView() but it feels like monkey patching a feature that should be handled by the router