Closed jacobmischka closed 3 years ago
Thank you! Fixed in 0.4.3. Use native relative links, they will be handled by the router.
Does this mean this part of the README is now wrong:
When the href attribute starts with a single / (like /mypage or just /), it will be treated as an internal link which will be matched with defined routes. Other cases do not affect the links' behavior.
@akvadrako yes, thanks. Fixed Readme.
According to the README and my testing, tinro only treats links that begin with a
/
as internal. This means that relative links, like navigating from/items/
to/items/12
using anhref="12"
triggers a full page reload.It would be nice if paths that don't begin with a protocol (
http://
or just//
) were treated as internal, or if there were some way to opt into this behavior (aninternal
attribute on the anchor tag, for example).Thanks for the great library!