I searched here on the forum for some solution but I found some complicated.
I am learning to use the angular / ionic.
I have a function that updates a list through an event, and I would like to call another function on another page to update that counts the total items in the list.
I will be grateful to anyone who can help me ^^
page1:
doRefresh(event)
{
setTimeout(() => {
this.sTxt = null;
this.sTipo = 0;
this.ngOnInit();
event.target.complete();
this.start = 0;
}, 500);
}
page2:
carregar()
{
let dados = { requisisao: 'hTotal' };
this.provider.Api(dados, 'api.php').subscribe(async data => {
if(data['success'])
{
this.hTotal = data['total'];
console.log(data);
}
else { this.hTotal = 0; }
});
}