Issue
Ionic router run OnInit only first time. I have an Ionic application. But OnInit only works once, so there is an alternative. I have version 6.11.1 of Ionic.
Solution
OnInit is an Angular lifecycle hook. Your objects are likely staying on the stack and are therefore simply re-rendered and thus not triggering onInit.
Since this is an Ionic application you should look at using ionViewDidEnter.
https://ionicframework.com/docs/angular/lifecycle
Answered By - user796446
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.