Angular: How to keep $scope properties in sync with controller functions?
<p>I have a controller like so:</p>

<pre><code>angular.module('myApp')
  .controller('MyCtrl', function ($scope, items, UserFactory) {
    $scope.items = items;
    $scope.changeItems = function (item) {
      // Do something with items, in the UserFactory
      UserFactory.removeItem(items);
    }
  }
</code></pre>

<p>Where <code>items</code> is returned by a <code>resolve</code> in the routeProvider.  </p>

<p>If <code>UserFactory.removeItem</code> operates on something like cookies or localStorage, or changes something on a model, what is the best way to also update <code>$scope.items</code></p>

<p>Should I have the <code>UserFactory.removeItem</code> return the new <code>items</code>, or should I do something directly in the <code>$scope.changeItems</code> function?</p>