import { Component } from "@angular/core" ; import { Progress } from "@nativescript/core" ; @ Component ( { moduleId : module . id , templateUrl : "./tips-and-tricks.component.html" , } ) export class TipsAndTricksComponent { onProgressBarLoaded ( args ) { let myProgressBar = args . object as Progress ; myProgressBar . value = 10 ; myProgressBar . maxValue = 100 ; setInterval ( ( ) => { myProgressBar . value += 2 ; } , 1000 ) ; } onValueChanged ( args ) { let myProgressBar = args . object as Progress ; console . log ( "Old Value: " + args . oldValue ) ; console . log ( "New Value: " + args . value ) ; } }