Doubth with navigate Ionic V5

If I am on a page whose name is “hello” and in it there is a button that takes you to a page whose name is “home” and in “home” there is another button that leads to “hello”, how can I make that when you press that button and go to home, the hello page is deleted, that is to say that when from “home” you go to “hello”, the hello data is reloaded.

// Data to display on screen
employee: string;
status: string;
date: string;

builder() {
this.status = window.localStorage.getItem (“status”);
this.employee = window.localStorage.getItem (“employee”); = window.localStorage.getItem (“date”);

When you go from “home” to “hello”, the data is refreshed.
Thankss to read.

I think you’ll get frustrated thinking about this in terms of “deleting” pages, because page lifecycle management is best left delegated entirely to the framework. Manage your data freshness independently. One idiom for doing this is described here.

1 Like