root path gives me the same behavior with *
See original GitHub issueI am having trouble with the following code : When I type the following url ‘/v1/a/b/c’, I’d like to match the “not found” handler. Instead, I match the root path that I defined at last (‘/’). It’s like I would have defined it that way : ‘/*’.
var router = new Navigo('/v1');
router.on('modify', function () {
setContent('modify');
})
.on('modify/:name', function (params, query) {
setContent('name');
})
.on('/', function () {
setContent('home');
})
router.notFound(function () {
console.log("not found");
// called when there is path specified but
// there is no route matching
});
router.resolve();
Issue Analytics
- State:
- Created 7 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
Maintain path relative to root folder · Issue #174 - GitHub
It should be in a completely different folder from the root itself. This way the action doesn't find any least common ancestor of...
Read more >How does the content root path work in .NET 6? - Stack Overflow
The web root path defaults to {content root}/wwwroot . In Razor . cshtml files, ~/ points to the web root.
Read more >Relative and absolute paths, in the file system and on the web ...
If the path is built starting from the system root, it is called absolute. If the path is built starting from the current...
Read more >DBX Root Header Modes Guide - Developers - Dropbox.com
Path Root Header Modes This means that relative paths are evaluated relative to this location, and paths outside of this location are not...
Read more >Quick Reminder About File Paths | CSS-Tricks
Starting with “/” returns to the root directory and starts there · Starting with “../” moves one directory backwards and starts there ·...
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
@richardsimko solved by using:
new Navigo(location.protocol + "//" + location.host, false)
@finppp I added a test case and it seems that I can’t reproduce the bug. Is Navigo operating at the very top folder of your site. I mean is it like under
site.com/...
or it is somewhere deeper likesite.com/web/app/...
.Here’s the test which had to reproduce the bug: