title: AngularJS: View not updated after $scope value is changed
body: <p>I want to update the filter of an ng-repeat in my view and for that reason I am using a $scope variable to change in my controller. For example here is a json array of my objects that I'll iterate in my view:</p>
  
  <pre><code>[{
      "address" : "#/",
      "title" : "Home",
      "name" : "Home",
      "category": "loggedIn loggedOut"
  }, {
      "address" : "#/logout",
      "title" : "Logout",
      "name" : "Logout",
      "category": "loggedIn"
  }, {
      "address" : "#/register",
      "title" : "Register",
      "name" : "Register",
      "category": "loggedOut"
  }, {
      "address" : "#/login",
      "title" : "Login",
      "name" : "Login",
      "category": "loggedOut"
  }]
  </code></pre>
  
  <p>Which is assigned to $scope.menuLinks. I also hava a $scope.menuFilter = "loggedIn"; for the filtration.</p>
  
  <p>Here is my view that I want to update:
  menu.html</p>
  
  <pre><code>&lt;div ng-controller="MenuController as menuCtrl"&gt;
      &lt;ul id="menu"&gt;
          &lt;li ng-repeat="link in menuLinks | filter:menuFilter"&gt;&lt;a
              href="{{link.address}}" title="{{link.title}}"&gt;{{link.name}}&lt;/a&gt;    &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here is my controller which changes the $scope.menuFilter:  </p>
  
  <pre><code> function LogoutController($scope, $http, $location) {
      var sessionkey = localStorage.getItem("sessionkey");
  
      $http({
          method : 'PUT',
          url : url + "/user/logout",
          headers : {
              'sessionkey' : sessionkey
          }
      }).success(function(data) {
          sessionkey = "";
          localStorage.setItem("sessionkey", sessionkey);
          $location.path('/');
          $scope.menuFilter = "loggedOut";
      });
   }
  </code></pre>
  
  <p>But when the LogoutController is called, the view does not change, I have to refresh the page in order to see the view changed. If I add $scope.$apply(); after $scope.menuFilter = "loggedOut"; then I get and error: [$rootScope:inprog] $digest already in progress</p>
  
  <p>What am I doing wrong? How should I update the view after a $scope value is changed?</p>