Issue
I’m developing an app based on tab navigation. ionic + stencil + typescript I would like to make my api calls everytime that the user enters on a page but the page don’t recharge when user change tab page because of caching. there is an event that I can listen to do this operation? I need to have fresh data from api every time the user enters in tab pages.
Solution: In the pare where I want to call the api each time the user enters the page, this code
@Listen('ionViewWillEnter')
listenIon() {
this.userData = undefined;
loadUserData(this.userId);
}
Solution
Hi This will help you.
I'm mostly using in angular "ionViewWillEnter" to do something when page view. It runs every time.
Cheers.
Answered By - Hassan Ali
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.