mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-20 23:42:50 +08:00
feat(core): nativescript.config and webpack updates (#8801)
This commit is contained in:
21
apps/automated/src/xml-declaration/mymodule/MyControl.ts
Normal file
21
apps/automated/src/xml-declaration/mymodule/MyControl.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { StackLayout, Label, Button, EventData } from '@nativescript/core';
|
||||
|
||||
export class MyControl extends StackLayout {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
var counter: number = 0;
|
||||
|
||||
var lbl = new Label();
|
||||
var btn = new Button();
|
||||
btn.text = 'Tap me!';
|
||||
btn.on(Button.tapEvent, (args: EventData) => {
|
||||
lbl.text = 'Tap ' + counter++;
|
||||
});
|
||||
|
||||
this.addChild(lbl);
|
||||
this.addChild(btn);
|
||||
|
||||
this.className = 'MyStackLayout';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user