Having an issue with refreshing data from localStorage.
I currently have a list of items that I am able to display. When I add a new item to the array, it shows up properly.
Everything seems to be in order as I can see that the new object was added to the items array.
The problem arises when I close and reopen the app. Even though the alert indicates that the object exists with the correct number of items, the items are not being displayed on the view.
Not sure if this is related to a $scope or async issue. The array definitely exists...
Edit:
I start with an array containing three items. After pushing to localstorage, I retrieve the data into '$scope.items'.
Initially, the data displays correctly from '$scope.items'. When I turn off the app and restart it, the array loads properly from localstorage without any issues.
However, when attempting to add more items to the array within the app (loading them from localstorage), everything seems to work fine based on alerts showing the updated objects. But upon restarting the app, the view appears empty again even though the updates were coming from localstorage.
As this is happening on a mobile device, I'm unable to directly check localstorage for the data.