import { EventData } from 'tns-core-modules/data/observable' ; import { Page } from 'tns-core-modules/ui/page' ; import { HomeViewModel } from './home-view-model' ; export function pageLoaded ( args ) { let page = < Page > args . object ; page . bindingContext = new HomeViewModel ( ) ; }