So I've created a feature where users can scan product barcodes using BarcodeScanner. Once the barcode is scanned, the product ID appears in a text field and is then sent to another page where an API call is made to display product details. On this product details page, there's a back button that allows the user to go back to the scanning page.
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button default-href=""></ion-back-button>
</ion-buttons>
<ion-title>Product Details</ion-title>
</ion-toolbar>
</ion-header>
The issue I'm facing is that when the user comes back to the scanning page using the back button, the product ID that was previously scanned is still displayed in the text field. What I would like to do is refresh the page after coming back using the back button. I tried implementing the following code:
ionViewWillEnter() {
}
However, this solution didn't work. Could someone please advise me on how I can achieve the desired functionality?