When using.start()
, you should supply a starting path or state except if you use the browser plugin (the current URL will automatically be used).
.start(startPathOrState[, done])
function will:startPathOrState
startPathOrState
was provided, or navigation failedstartPathOrState
was not provided / failedcreateRouter
options. The following example will cause your application to navigate to /about
:navigate(routeName, routeParams, opts)
. This method has to be called for navigating to a different route: clicks on links won't be intercepted by the router.reload
is set to true
.replace
to true for replacing the current state in history when navigating to a new route. Default behaviour is to add an entry in history.navigate
: those options will be added to the state of your router (under meta
)..start()
, .navigate()
accepts a callback (last argument):.start()
again.