Automatically append query string parameter to all links? #2703
Unanswered
BrianVallelunga
asked this question in
Q&A
Replies: 2 comments 2 replies
-
An option would be to wrap |
Beta Was this translation helpful? Give feedback.
2 replies
-
this is what search middlewares are for: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to automatically modify the
toLocation
of all links when clicked. I'd like to either add a search parameter or modify the path in some way.I've tried playing with
router.subscribe
but it seems to be read-only. Is there a way to add some middleware that can accomplish this? I saw references to middleware, but none on creating it myself.For example, assuming a user clicks a link to
https://mysite.com/page
then I would like to modify the URL and send the user tohttps://mysite.com/page?x=somevalue
so that is what is shown in the browser.Thanks
Beta Was this translation helpful? Give feedback.
All reactions