willyrs
03/05/2021, 9:31 AMoverride fun RBuilder.render() {
browserRouter {
div {
ul {
li {
routeLink("/") { +"Home" }
}
li {
routeLink("/test") { +"Test" }
}
}
switch {
route("/") {
h1 {
+"Home path"
}
}
route("/test") {
h1 {
+"Test path"
}
}
}
}
}
}
What happens:
When I start the website, it prints "Home path". The I press "Test" in the menu, the url changes to http://localhost:8080/test but the header still says "Home path". If I then press F5 I have the error "Cannot GET /test".
What could be the problem? It seems the same as the tutorial that I'm looking atchristophsturm
03/05/2021, 9:46 AMchristophsturm
03/05/2021, 9:46 AMwillyrs
03/05/2021, 10:29 AMwillyrs
03/05/2021, 10:37 AMchristophsturm
03/05/2021, 10:43 AMchristophsturm
03/05/2021, 10:43 AMwillyrs
03/05/2021, 10:44 AMwillyrs
03/05/2021, 10:44 AMwillyrs
03/05/2021, 10:44 AMchristophsturm
03/05/2021, 10:44 AMMarc Knaup
03/12/2021, 5:49 PM