import { ObservableArray } from "tns-core-modules/data/observable-array" ; import { Observable } from "tns-core-modules/data/observable" ; export class ViewModel extends Observable { private _words = [ "One" , "Two" , "Three" , "Four" , "Five" , "Six" , "Seven" , "Eight" , "Nine" , "Ten" ] ; constructor ( ) { super ( ) ; this . dataItems = new ObservableArray < DataItem > ( ) ; for ( let i = 0 ; i < 10000 ; i ++ ) { this . dataItems . push ( new DataItem ( i , "Item " + i , "This is item description " + i ) ) ; } } get dataItems ( ) : ObservableArray < DataItem > { return this . get ( "_dataItems" ) ; } set dataItems ( value ) { this . set ( "_dataItems" , value ) ; } } export class DataItem { public id : number ; public itemName ; public itemDescription ; constructor ( id , name , description ) { this . id = id ; this . itemName = name ; this . itemDescription = description ; } }