vendredi 30 juillet 2021

Blazor routing and navigation issue, how to add navigation to components, but not not load all new page

I'm trying to add navigation to my components, but not navigating away from the current overall page that I'm on. I'll use Azure Dev Ops web app as an example of this. When in a repo and searching through files, there is a tree view on the left showing the files/folders in that repo. The user can navigate this tree view and click on a file, and on the right it then shows the file. When the user clicks on the file in the tree view and loads the file preview on the right, the url changes each time, but there is no new page. It's not navigating away to a new page, just changing the url, so that there is navigation history and user can use back/forward buttons. Actually, every click and action the user does, changes the URL, like clicking on different tabs on the file preview.

I can mimic the same behavior with having a tree view and the user can navigate it and load a preview on the right of the window, but these are not page components. These are just regular components that get loaded with different data as the user clicks on different files on the tree view. But there is no new changing urls/navigation history. I'm mainly a winforms guy, so learning web dev. So I guess my question is, how do I have child components, that are page components as well? Or is there a way to just add navigation to a component without making it a page component? I've searched everywhere for an answer to this, but not found it. Thank's much in advance!

Image of dev ops page for a better visual




Aucun commentaire:

Enregistrer un commentaire