How to let initiated Controller Know that scope value has changed

Am new in AngularJS. I have a signin controller which verifies the user details and when successful calls a service to save the user details in localStorage and and also assign the details to a variable in same service that is used to retrieve that user details from various views. Buh after login when i redirect user to another view which has been previously initiated (Visted page) i will not see the new updated user details until i refresh the page(view) meaning the view does not know that the value of user variable in my service has changed. Please how do I make it know and also change the view scope value.

Create a method in your controller to handle the refresh, i.e:

$scope.refresh = function() {
  // Do things that load data here, probably with promises
};

Then use that to kick off loading your controller the first time it's viewed, i.e. call the refresh function in your controller:

$scope.refresh();

Then you have the flexibility to do things like assign an event to force the data to refresh, like (in your controller):

$rootScope.$on("app.refresh.foo", function() {
  $scope.refresh();
});

Then elsewhere, broadcast like:

$rootScope.$broadcast("app.refresh.foo"); 

And if the view has been loaded, it'll call the refresh function.

One great thing about this method is that you have the added flexibility of adding as many things as you need to to the refresh function. You don't have to set up individual watchers.

You need to define in your controller a watcher on your service value :

    $scope.$watch(function() {
        return myService.getVal();
    }, function(newVal, oldVal) {
       if(newVal !== oldVal) alert("NEW VALUE");


    });