Router

The router is responsible for mapping URLs to components.

Methods

childRouter

Constructs a child router. You probably don't need to use this unless you're writing a reusable component.

registerViewPort

Register an object to notify of route changes. You probably don't need to use this unless you're writing a reusable component.

config

Update the routing configuation and trigger a navigation.

router.config({ path: '/', component: '/user' });

For more, see the configuration guide.

navigate

Navigate to a URL. Returns the cannonical URL for the route navigated to.

renavigate

Navigates to either the last URL successfully naviagted to, or the last URL requested if the router has yet to successfully navigate. You shouldn't need to use this API very often.

generate

generate a URL from a component name and optional map of parameters. The URL is relative to the app's base href.