You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When hash routing is enabled, on first page visit (or reload), it will return a different hashString as compared to when i normally navigate on the page through an href with data-navigo.
let router = new Navigo("/", { hash: true}); router.on({ "/": (params)=>{console.log(params);}, "/test": (params)=>{console.log(params);} }); router.resolve();
for example:
on first load:
> example.com/#/test
< params.hashString is "/test"
on navigation through a link (data-navigo href="/test"):
> example.com/#/test
< params.hashString is ""
normally i would expect it to return "" on both occasions.
however if an "actual" hash is provided it works like that
on first load:
> example.com/#/test#test2
< params.hashString is "test2"
on navigation through a link (data-navigo href="/test#test2")::
> example.com/#/test#test2
< Navigo: "test2" didn't match any of the registered routes.
here i would expect them to return "test2"
The text was updated successfully, but these errors were encountered:
When hash routing is enabled, on first page visit (or reload), it will return a different hashString as compared to when i normally navigate on the page through an href with data-navigo.
let router = new Navigo("/", { hash: true});
router.on({
"/": (params)=>{console.log(params);},
"/test": (params)=>{console.log(params);}
});
router.resolve();
for example:
on first load:
> example.com/#/test
< params.hashString is "/test"
on navigation through a link (data-navigo href="/test"):
> example.com/#/test
< params.hashString is ""
normally i would expect it to return "" on both occasions.
however if an "actual" hash is provided it works like that
on first load:
> example.com/#/test#test2
< params.hashString is "test2"
on navigation through a link (data-navigo href="/test#test2")::
> example.com/#/test#test2
< Navigo: "test2" didn't match any of the registered routes.
here i would expect them to return "test2"
The text was updated successfully, but these errors were encountered: