Brisket provides methods to navigate the app in the browser.
Use navigateTo
to navigate to a new route.
// when in route "A"
Brisket.navigateTo("B");
// application routes to route "B"
Use reload
to re-run the current route. Note: In browsers that don't support pushState, reload
will cause the browser to refresh the page.
// when in route "A"
Brisket.reload();
// application re-runs route A
Use replacePath
to change location bar and replace pushState history entry.
// when in route "A"
Brisket.replacePath("B");
// application stays on route "A" but current history is route "B"
Use changePath
to change location bar and add an entry to pushState history.
// when in route "A"
Brisket.changePath("B");
// application stays on route "A" but adds a new history entry - route "B"