Description
Is your feature request related to a problem? Please describe.
I want to maintain some of my view state in the URL, such as the currently selected tab. I can and do use window.history.replaceState
for this, but the NavigationManager.Uri
is then out of sync. I'd like to be able to keep the Uri
in sync, as I'm using it to help manage this state. I need to get the Uri
synchronously so I can't just call location.href
using interop.
Describe the solution you'd like
Simple option
I believe the simplest solution would be to make NavigationManager.Uri
settable publicly so I can then perform this task myself. I don't want to have to implement my own NavigationManager
just for this purpose. It is already clear in the docs that setting Uri
doesn't trigger LocationChanged
, which again, is my desired behavior, so hopefully making this public isn't too big of a concern.
Fancier option
The other option is to expose the replace
that already exists in navigateTo()
in NavigationManager.ts
. However... I don't want to trigger OnParametersSet
in my scenario, and I think this would do so by default. Personally, I'd like to submit a PR for the first option and leave this one on the table.