if (FALSE) {
ui <- function() {
router_ui(
route("/", root_page(id = "root")),
route("other", other_page(id = "other")),
page_404 = page404(
message404 = "Please check if you passed correct bookmark name!")
)
}
}
if (FALSE) {
# create the list of routes
dynamic_routes <- list(
route("other2", other_page(id = "other2")),
route("other3", other_page(id = "other3"))
)
ui <- function() {
router_ui(
route("/", root_page(id = "root")),
route("other", other_page(id = "other")),
# then it's possible to inject a list of arguments into a function call using rlang::`!!!`
!!!dynamic_routes,
page_404 = page404(
message404 = "Please check if you passed correct bookmark name!")
)
}
}
Run the code above in your browser using DataLab