/area/:id doens't work
See original GitHub issueI´m trying to use the url path parameter, but in all cases that i have a variable in the parameter Navigo doesn’t recognize the url, and doesn’t do the route. So Navigo always choose the default mapping. The navigate method works, but when i hit the url in the browser it doesn’t.
let router = new Navigo();
router.on({
"/area/:id": function (params) {
mountPage(params.id);
},
});
router.on(function () {
console.log("default")
mountDefault();
});
router.resolve();
The url that i´m trying is: http://localhost:8080/area/fin
I´ve tryed without the port number, but same result
The version that i´m using is the master, but i tryed the: https://cdn.jsdelivr.net/npm/navigo@6.0.0/lib/navigo.min.js
With last firefox and crhome presenting the same behavior
Just found out that if i hit this url: http://localhost:8080/area/:id Navigo finds the right mapping …
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Azure DevOps: Rule with Area ID not working - Stack Overflow
I have created a rule that makes a field mandatory if the area ID is 12. However, the rule doesn't work. Nothing happens....
Read more >If Face ID isn't working on your iPhone or iPad Pro
By default, Face ID doesn't work if anything is covering your mouth and nose. If you're wearing a face mask and have already...
Read more >Error Messages | Maps JavaScript API - Google Developers
The Premium Plan or Maps APIs for Work client ID included in the script load is ... The client parameter doesn't seem to...
Read more >home button works but touch id doesn't work - iPhone 6s - iFixit
I want to make it clear before i began is NO I DID NOT REPLACE THE HOME BUTTON , home button is still...
Read more >Common questions about the Microsoft Authenticator app
A: Users can send logs to customer support and get the Incident ID with these steps: Open Microsoft Authenticator. Tap Send feedback in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s because people (including me) use Navigo in a nested URL like
http://site.com/myproduct/app/
and the root for the router should behttp://site.com/myproduct/app
nothttp://site.com
.Just update the README and now contains this:
The thing is that this guessing bit doesn’t work if you have just a few routes. We can’t just pick the current one because you may visit the page within a nested URL. So the
root
must be set in order to get Navigo working properly. In the future version this will be a mandatory parameter and you’ll simply see an error.