I have a single-page app where i use anchor links to scroll to the desired sections. If i load the “frontpage” of the app, i.e. without any anchors, and click the links, everything works as intended. However, i am unable to “deep link”, i.e. go directly to an anchor, without loading the page first. Here is a MWE,
import dash import dash_html_components as html app = dash.Dash() app.layout = html.Div([html.P("Hello world."), html.A("To the end", href="#end")] + [html.Br()]*100 + [html.P("Goodbye world", id="end")]) if __name__ == '__main__': app.run_server()
If you to run the code, go to http://127.0.0.1:8050/ and click the link, the page will scroll to the bottom. However, if you just open the link http://127.0.0.1:8050/#end, it will not. Is there any way to achieve this behavior?