(args: ShownModallyData)
| 1 | import { Page, ShownModallyData, EventData, fromObject, Dialogs } from '@nativescript/core'; |
| 2 | |
| 3 | export function onShowingModally(args: ShownModallyData) { |
| 4 | console.log('login-page.onShowingModally, context: ' + args.context); |
| 5 | const page = <Page>args.object; |
| 6 | |
| 7 | page.bindingContext = fromObject({ |
| 8 | username: 'username', |
| 9 | password: 'password', |
| 10 | context: args.context, |
| 11 | onLoginButtonTap: function () { |
| 12 | console.log('login-page.onLoginButtonTap'); |
| 13 | args.closeCallback(this.username, this.password); |
| 14 | }, |
| 15 | showAlert: function () { |
| 16 | Dialogs.alert('showing alert!'); |
| 17 | args.closeCallback(); |
| 18 | }, |
| 19 | openNestedModal: function () { |
| 20 | page.showModal('modal-view/nested-modal', { |
| 21 | context: 'First', |
| 22 | closeCallback: () => { |
| 23 | console.log('login-page.openNestedModal'); |
| 24 | }, |
| 25 | }); |
| 26 | }, |
| 27 | }); |
| 28 | } |
| 29 | |
| 30 | export function onShownModally(args: ShownModallyData) { |
| 31 | console.log('login-page.onShownModally, context: ' + args.context); |
nothing calls this directly
no test coverage detected