How can I stop an Angular resolver running when clicking the ion-back-button?
I have two components; DashboardComponent and PageOneComponent. When the app first loads, the DashboardComponent resolver fires, fetches an array of data from the API and displays it on the DashboardComponent in a list of ion-item. Users can then click on an ion-item, which navigates to the PageOneComponent, to view more information about each item. When clicking ion-back-button, the User is taken back to the DashboardComponent and the resolver fires again.
As the Ionic DashboardComponent is never really destroyed, I wouldn’t expect the resolver to run again when clicking the back button. The same way as the ngOnInit event doesn’t fire when clicking the back button either.
Does anyone know how to prevent this behaviour?