Home Ionic how to display result from .ts file?
 I have created an application, and I get the data from my API, after that I successfully do all the calculation, and the answer is saved inside a variable inside my .ts file show in below  getApiData_record() { this.restProvider.getApiData_record().then(data =>{ this.users = data; var totalDuration=0; var fee1 = []; for (var i of this.users){ fee1.push(i.fields.duration); } for (var j=0; j < fee1.length; j ++){ console.log("here", fee1[j]) totalDuration = totalDuration + fee1[j]; } console.log("Record Here", data, totalDuration) return totalDuration; }) }  Now I need to totalDuration to be show in my .html page, how I show the results?