MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / createPage

Function createPage

apps/ui/src/events/i61-page.ts:5–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import * as panelModule from '@nativescript/core/ui/layouts/stack-layout';
4
5export function createPage() {
6 // https://github.com/NativeScript/cross-platform-modules/issues/61
7
8 var stackPanel = new panelModule.StackLayout();
9 stackPanel.id = 'stackPanel';
10
11 var btn = new button.Button();
12 btn.text = 'getViewById';
13
14 var page = new pages.Page();
15 page.content = stackPanel;
16 page.getViewById<panelModule.StackLayout>('stackPanel').addChild(btn);
17
18 return page;
19}

Callers

nothing calls this directly

Calls 1

addChildMethod · 0.45

Tested by

no test coverage detected