Basic Routing for Shiny Web Applications


[Up] [Top]

Documentation for package ‘shiny.router’ version 0.1.1

Help Pages

callback_mapping Create a mapping bewtween a ui element and a server callack
change_page Change the currently displayed page.
cleanup_hashpath Formats a URL fragment into a hashpath starting with "#!/"
create_router_callback Internal function creating a router callback function. One need to call router callback with Shiny input and output in server code.
extract_link_name Extract link name
get_page Convenience function to retrieve just the "page" part of the input. This corresponds to what might be called the "path" component of a URL, except that we're using URLs with hashes before the path & query (e.g.: http://www.example.com/#!/virtual/path?and=params)
get_query_param Convenience function to retrieve any params that were part of the requested page. The param values returned come from "httr::parse_url()"
is_page Is page
log_msg Helper function to print out log messages into Shiny using cat() and stderr(), as described on https://shiny.rstudio.com/articles/debugging.html
make_router Creates router. Returned callback needs to be called within Shiny server code.
page404 404 page
PAGE_404_ROUTE Default 404 page
parse_url_path Parse url and build GET parameters list
route Create single route configuration.
router_ui Creates an output for router. This configures client side. Call it in your UI Shiny code. In this output ui is going to be rendered according to current routing.
route_link Route link Adds /#!/ prefix to link.
valid_path Internal function that validates that path is defined in routes.