[][src]Function seed::routing::setup_link_listener

pub fn setup_link_listener<Ms>(
    update: impl Fn(Ms) + 'static,
    routes: fn(_: Url) -> Option<Ms>
) where
    Ms: 'static, 

Set up a listener that intercepts clicks on elements containing an Href attribute, so we can prevent page refresh for internal links, and route internally. Run this on load.