navigateTo weird behavior

Hello All, i have an issue when i use navigateTo. Most of the time there is no issue, however, when I navigate to a page by typing the path of the page and then try to navigate from that page using navigateTo it will not remove the typed part of the path and cause 404 not found. example: if i go to www.website.com/notification by typing the path manually then I try to navigate to www.website.com/notification/example using "navigateTo " it will take me to "www.website.com/notification/notification/example
Solution:
I'm assuming you're using it like so: navigateTo('notification/example'). This is a relative path. You need to add a / to the front: navigateTo('/notification/example')
Jump to solution
3 Replies
Solution
Gerbuuun
Gerbuuun4mo ago
I'm assuming you're using it like so: navigateTo('notification/example'). This is a relative path. You need to add a / to the front: navigateTo('/notification/example')
Rakan Alahmadi
Rakan AlahmadiOP4mo ago
Thank you, yes I was using it exactly the way you mentioned. after changing it, the issue seems to disappear
Gerbuuun
Gerbuuun4mo ago
If this fixed your problem, could you mark this as solved? It would help other people who might have the same problem
Want results from more Discord servers?
Add your server