import { Label , EventData , GestureEventData , Page } from '@nativescript/core' ; export function pageLoaded ( args ) { var page = < Page > args . object ; page . bindingContext = { tapAction : tapAction , doubleTapAction : doubleTapAction , cleanResult : cleanResult } ; } export function tapAction ( args ) { setResult ( args , 'tapAction' ) ; } export function doubleTapAction ( args ) { setResult ( args , 'doubleTapAction' ) ; } export function cleanResult ( args ) { setResult ( args , '' ) ; } const setResult = ( args , text ) => { console . log ( text ) ; const resultPanel = ( < Page > ( < any > args . object ) . page ) . getViewById ( 'resultContainer' ) ; resultPanel . text = text ; } ;