forked from NativeScript/NativeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpageNavigation.ts
More file actions
27 lines (24 loc) · 851 Bytes
/
pageNavigation.ts
File metadata and controls
27 lines (24 loc) · 851 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as frame from "tns-core-modules/ui/frame";
import * as pages from "tns-core-modules/ui/page";
import * as buttonModule from "tns-core-modules/ui/button";
import * as tabViewModule from "tns-core-modules/ui/tab-view";
export function createPage() {
var tab = new tabViewModule.TabView();
tab.items = [];
for (var i = 0; i < 10; i++) {
var button = new buttonModule.Button();
button.text = "Test";
button.on(buttonModule.Button.tapEvent, function () {
var topFrame = frame.topmost();
topFrame.goBack();
});
let item = new tabViewModule.TabViewItem();
item.title = "Tab " + i;
item.view = button;
tab.items.push(item);
}
var page = new pages.Page();
page.content = tab;
return page;
}
//export var Page = new pages.Page();