Context
I’ve been trying to replicate what wikipedia does with their URL
It works something like
/[Namespace]:[PageName]
/[PageName]
So if I go to /randompage
I get as params:
- namespace:
''
- page name:
'randompage'
and if I go to /whatever:anotherpage
I get:
- namespace:
'whatever'
- page name:
'anotherpage'
Problem
My issue lies in not being able to escape the colon (:).
For example, if I use – instead the route string is as simple as :namespace-:pagename
, but I tried doing :namespace::pagename
and I got very weird results. As an example, when I tried to match /hi:bye
I got as namespace h
and as page name i:bye
(see this).
Similar results with everything else I tried (:template\::pagename
, :template()\::pagename
).
What’s the proper way of handling this type of issues in Vue Router?
Nala is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1