Should this `link("/test", url = "/test", dataNavi...
# kvision
m
Should this
link("/test", url = "/test", dataNavigo = true)
work the same as
routing.navigate("/test")
? Because for me, the former reloads page, while the latter works as expected (uses history api).
Also tried
Copy code
link("/test", url = "/test") {
    setAttribute("data-navigo", "true")
}
r
When using history api you need to call
routing.updatePageLinks()
after every change on the page. It will update links and make them work with history api. See more in the navigo docs: https://github.com/krasimir/navigo/blob/master/DOCUMENTATION.md#augment-your-a-tags
When using reactive model you can just put this call in your state binding function with additional, simple "timeout trick":
Copy code
window.setTimeout({
    routing.updatePageLinks()
}, 0)
Also note you can use
Link.useDataNavigoForLinks = true
when initializing your app, and you don't need to add
dataNavigo
manually to all your links.
m
That was the missing part :) thank you so much Robert, will try that in the evening