navigo icon indicating copy to clipboard operation
navigo copied to clipboard

Question/FeatureRequest: Ignore routes

Open meodai opened this issue 3 years ago • 0 comments

I am working on a website that is static but I want to use the router for the blog part. (On the client/browser side) I have a single shared JS file. I figured the following would ignore all routes that are not /blog:

const router = new Navigo('/blog');
router.on('/:title', ({ data }) => {
  console.log(data.title)
});
router.resolve();

but it still throws an error catches mydmain.whatever/admin/ for example. Any idea how to solve that? Am I doing something wrong?

meodai avatar Jul 07 '21 11:07 meodai