()
| 3 | import * as panelModule from '@nativescript/core/ui/layouts/stack-layout'; |
| 4 | |
| 5 | export 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 | } |