import { Page , GridLayout , ListView , Observable , ObservableArray , EventData } from '@nativescript/core' ; var arr = new ObservableArray ( ) ; for ( var i = 0 ; i < 100 ; i ++ ) { arr . push ( 'item ' + i ) ; } export function createPage ( ) { var page = new Page ( ) ; var grid = new GridLayout ( ) ; var listView = new ListView ( ) ; listView . on ( ListView . loadedEvent , function ( args ) { ( < any > args . object ) . items = arr ; } ) ; grid . addChild ( listView ) ; page . content = grid ; return page ; }