Skip to content

Commit e0a16f7

Browse files
committed
Merge pull request #855 from ganmor/updatedoc
Update doc for Navigation api , goback method. Following up on #408
2 parents 096fcb6 + f286767 commit e0a16f7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/api/mixins/Navigation.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,19 @@ this.replaceWith('/users/10?showAge=true');
3636
### `goBack()`
3737

3838
Programmatically go back to the last route and remove the most recent
39-
entry from the browser history.
39+
entry from the browser history. Return false if it's the first entry in the app history, true otherwise.
4040

4141
#### Example
4242

4343
```js
4444
this.goBack();
4545
```
46+
If you want to make sure there is an history entry
47+
```js
48+
if (!this.goBack()) {
49+
this.transitionTo('/otherpage')
50+
}
51+
```
4652

4753
### `makePath(routeName, params, query)`
4854

0 commit comments

Comments
 (0)