mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
@@ -2,6 +2,7 @@
|
||||
import pages = require("ui/page");
|
||||
import textField = require("ui/text-field");
|
||||
import frame = require("ui/frame");
|
||||
import dialogs = require("ui/dialogs");
|
||||
|
||||
var closeCallback: Function;
|
||||
|
||||
@@ -65,4 +66,13 @@ export function onLoginButtonTap() {
|
||||
else {
|
||||
frame.topmost().goBack();
|
||||
}
|
||||
}
|
||||
|
||||
export function onShowDialogButtonTap() {
|
||||
console.log(">>> login-page.onShowDialogButtonTap");
|
||||
|
||||
dialogs.alert({ title: "test", message: "Anything", okButtonText: "ok" })
|
||||
.then(function () {
|
||||
console.log("Dialog closed!");
|
||||
});
|
||||
}
|
||||
@@ -12,5 +12,6 @@
|
||||
<TextField hint="username" id="username" text="username"/>
|
||||
<TextField hint="password" id="password" text="password" secure="true"/>
|
||||
<Button text="Login" tap="onLoginButtonTap"/>
|
||||
<Button text="Show Dialog" tap="onShowDialogButtonTap"/>
|
||||
</StackLayout>
|
||||
</Page>
|
||||
Reference in New Issue
Block a user