Skip to content

Commit 36906e3

Browse files
committed
adding the suggested changes for using args.object.page.frame
1 parent 898ac91 commit 36906e3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/app/ui/frame/frame.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ Using the `BackstackEntry` allows us to navigate back to a specific page.
3939
</Page>
4040
```
4141
```TypeScript
42-
import {topmost, BackstackEntry} from "ui/frame"
42+
import {BackstackEntry, Frame} from "ui/frame"
4343

4444
export function backNavigation(args){
45-
let backstackEntryFirstPage = topmost().backStack[0];
46-
topmost().goBack(backstackEntryFirstPage);
45+
let backstackEntryFirstPage:BackstackEntry = <BackstackEntry>args.object.page.frame.backStack[0];
46+
var frame:Frame = <Frame>args.object.page.frame
47+
frame.goBack(backstackEntryFirstPage);
4748
}
4849
```
4950
With the help of the Frame we access the page's BackstackEntry by providing the the sequence number - `backStack[<page number>]`. In the example above we will navigate back to the initial page and to do that we need to take the first BackstackEntry as follow: `topmost().backStack[0]`

0 commit comments

Comments
 (0)