package myapp
import org.scalajs.dom
import com.raquo.laminar.api.L.{*, given}
import frontroute.*
val myApp = routes(
div(
pathEnd {
div("Home page.")
},
(path("about")) {
div("About page")
},
(noneMatched & extractUnmatchedPath) { unmatched =>
div(
div("Not Found"),
div(
span("Not found path:"),
span(unmatched.mkString("/", "/", ""))
)
)
}
)
)
@main
def MyApp(): Unit =
lazy val root = dom.document.querySelector("#app")
renderOnDomContentLoaded(root, myApp)