import { Page } from "tns-core-modules/ui/page"; import { Label } from "tns-core-modules/ui/label"; function createCloseCallback(label: Label, context?: string): (username: string, password: string) => void { return function (username: string, password: string) { let result = username + "/" + password; result = context ? context + "/" + result : result; console.log(result); label.text = result; } } function openModal(page: Page, label: Label, context: string) { page.showModal("ui-tests-app/modal-view/login-page", { context, closeCallback: createCloseCallback(label, context), fullscreen: false, }); } export function onTap(args) { const page = args.object.page; const label = page.getViewById