Skip to content
This repository was archived by the owner on Nov 17, 2022. It is now read-only.

Commit e232efe

Browse files
committed
Added info about NavigationEntry.backstackVisible.
1 parent 6e5f9cb commit e232efe

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

navigation.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ NativeScript apps consist of pages which represent the separate application scre
2020
* [Navigate by Page Name](#navigate-by-page-name)
2121
* [Navigate with Factory Function](#navigate-with-factory-function)
2222
* [Navigate and Pass Context](#navigate-and-pass-context)
23+
* [Navigate without History](#navigate-without-history)
2324
* [Navigate Back](#navigate-back)
2425
* [Supporting Multiple Screens](#supporting-multiple-screens)
2526
* [Screen Size Qualifiers](#screen-size-qualifiers)
@@ -194,8 +195,6 @@ var navigationEntry = {
194195
topmost.navigate(navigationEntry);
195196
```
196197

197-
After you pass the context, you can implement additional business logic with the `onNavigatedTo` callback.
198-
199198
#### Example
200199

201200
In this example, this master-details app consists of two pages. The main page contains a list of entities. The details page shows information about the currently selected entity.
@@ -238,6 +237,25 @@ export function pageNavigatedTo(args: observable.EventData) {
238237
}
239238
```
240239

240+
### Navigate without history
241+
242+
You can navigate to a page without adding this navigation to the history. Set the `backstackVisible` property of the [`NavigationEntry`](ApiReference/ui/frame/NavigationEntry.md) to `false`. If this property is set to false then the Page will be displayed but once navigated from it will not be able to be navigated back to.
243+
244+
``` JavaScript
245+
var navigationEntry = {
246+
moduleName: "login-page",
247+
backstackVisible: false
248+
};
249+
topmost.navigate(navigationEntry);
250+
```
251+
``` TypeScript
252+
var navigationEntry = {
253+
moduleName: "login-page",
254+
backstackVisible: false
255+
};
256+
topmost.navigate(navigationEntry);
257+
```
258+
241259
### Navigate Back
242260

243261
The topmost frame tracks the pages the user has visited in a navigation stack. To go back to a previous page, you need to use the **goBackMethod** of the topmost frame instance.

0 commit comments

Comments
 (0)