From f286767bc5d65c923074b52610b13f277ce45f69 Mon Sep 17 00:00:00 2001 From: Morgan Date: Thu, 19 Feb 2015 10:20:58 +0100 Subject: [PATCH] Update doc for Navigation api , goback method. Following up on #408 --- docs/api/mixins/Navigation.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/api/mixins/Navigation.md b/docs/api/mixins/Navigation.md index 44b069db57..b97131c704 100644 --- a/docs/api/mixins/Navigation.md +++ b/docs/api/mixins/Navigation.md @@ -36,13 +36,19 @@ this.replaceWith('/users/10?showAge=true'); ### `goBack()` Programmatically go back to the last route and remove the most recent -entry from the browser history. +entry from the browser history. Return false if it's the first entry in the app history, true otherwise. #### Example ```js this.goBack(); ``` +If you want to make sure there is an history entry +```js +if (!this.goBack()) { + this.transitionTo('/otherpage') +} +``` ### `makePath(routeName, params, query)`