struct
PageCx
pub struct PageCx {
/* private fields */
}What a page's companion scope gets: its parameters and query.
Methods
new
pub fn new(props: &Props) -> PageCxThe page context for a page or layout with props (its params and path).
param
pub fn param(&self, name: &str) -> Option<String>A route parameter (slug for /blog/:slug/). Reading it inside Scope::computed follows client-side navigation between two paths of the same route.
path
pub fn path(&self) -> StringThe page's address (/about/). Reading it inside Scope::computed follows client-side navigation.