mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
import * as observable from "@nativescript/core/data/observable";
|
||||
import * as stackLayoutModule from "@nativescript/core/ui/layouts/stack-layout";
|
||||
import * as label from "@nativescript/core/ui/label";
|
||||
import * as button from "@nativescript/core/ui/button";
|
||||
import { StackLayout, Label, Button, EventData } from "@nativescript/core";
|
||||
|
||||
export class MyControl extends stackLayoutModule.StackLayout {
|
||||
export class MyControl extends StackLayout {
|
||||
constructor() {
|
||||
super();
|
||||
|
||||
var counter: number = 0;
|
||||
|
||||
var lbl = new label.Label();
|
||||
var btn = new button.Button();
|
||||
var lbl = new Label();
|
||||
var btn = new Button();
|
||||
btn.text = "Tap me!";
|
||||
btn.on(button.Button.tapEvent, (args: observable.EventData) => {
|
||||
btn.on(Button.tapEvent, (args: EventData) => {
|
||||
lbl.text = "Tap " + counter++;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user