Added closeModal() to the d.ts and updated the sample app.

This commit is contained in:
Rossen Hristov
2015-10-01 11:13:52 +03:00
parent 7366e546dc
commit eec823d29d
3 changed files with 10 additions and 0 deletions

View File

@@ -16,4 +16,8 @@ export function onTap(args: observable.EventData) {
console.log(username + "/" + password);
label.text = username + "/" + password;
}, fullscreen);
}
export function onCloseModal(args: observable.EventData) {
page.closeModal();
}

View File

@@ -3,5 +3,6 @@
<Button text="Login (small)" tap="onTap" />
<Button text="Login (full-screen)" tap="onTap" />
<Label id="label" text="Anonymous"/>
<Button text="Close Modal" tap="onCloseModal" />
</StackLayout>
</Page>

5
ui/page/page.d.ts vendored
View File

@@ -157,6 +157,11 @@ declare module "ui/page" {
*/
showModal(moduleName: string, context: any, closeCallback: Function, fullscreen?: boolean);
/**
* Closes the current modal dialog that this page is showing.
*/
closeModal();
//@private
/**