You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/app/ui/frame/frame.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,12 @@ Using the `BackstackEntry` allows us to navigate back to a specific page.
39
39
</Page>
40
40
```
41
41
```TypeScript
42
-
import {topmost, BackstackEntry} from"ui/frame"
42
+
import {BackstackEntry, Frame} from"ui/frame"
43
43
44
44
exportfunction 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);
47
48
}
48
49
```
49
50
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