On the first page of my app I have two radio buttons, depending on which one is selected a particular list is displayed on the next view.
If I then return to the home page and change the radio button setting, when I move to the second view again, the list is not updated to reflect the change in setting from the radio button. (Changes to the radio button value is confirmed.)
It appears that the variable set from the radio button is not updated when the second controller/view is accessed the second and subsequent times.
I have tried:
- using $rootScope to share the variable across the controllers
- using localstorage to read the variable in the second controller
How do I set up the app such that when a variable is changed the controller can pick it up?
I figure there is probably a simple answer, but as a new learner to ionic/angular/js I can’t see it.