I have a list of item, when you click on one:
- It sets the value for a variable ABC
- It loads a new page (detail view)
As the new page loads it:
- Uses the value in the variable to populate the page.
This works the first time.
But when you go back to the list view and start again clicking on a new item, it populates the variable with the old items data?
If I go back and forth a few times and reset the page… I finally get the new data, but that is then used on future loads.
I know it is doing this because I can see the variable value AND I actually clear the variable when the starting page loads, so I always have an empty variable before the process starts.
I have tried a couple of things:
- I set the variable when the destination page loads instead of at the origin - Same issue
- I tried adding some delay to the page load - Incase the page loaded before the variable was set? - Same issue.
- I changed setting the variable from page load to pre-page load - Same issue
- I have turned off preserve on navigation and from local storage for the variable - Same issue
Any ideas?