In my app the user sets his/her gender in the first view, and I store it in the localStorage.
$scope.setGender = function(gender){
$scope.data.gender = gender;
localStorage.setItem('paramGender', $scope.data.gender);
}
Then, the user goes to the second view and read its gender in the code by reading the localStorage:
$scope.data.gender = localStorage.getItem("paramGender"));
But if the the user goes back to the first view, change his/her gender and goes back to the second view, $scope.data.gender is not updated in the second controller.
How can I achieve that without reloading the whole second view? (I need to keep the cache because this second view is heavy).