title: AngularJS - implementing "undo" with angular.copy fails
body: <p>Following issue: Let's say, we have an object like this:</p>
  
  <pre><code>$scope.Something = { 'a' : { object... }, 'b' : { another object... } }
  </code></pre>
  
  <p>This Something-object is also rendered in the view as follows:</p>
  
  <pre><code>&lt;div ng-repeat="s in Something"&gt;{{ Something[s].someProperty }}&lt;/div&gt;
  </code></pre>
  
  <p>The user wants to edit <strong>Something.a</strong>. For this, we show him a form. Before the form is shown, I save the current <strong>Something.a</strong> as a copy:</p>
  
  <pre><code>$scope.copyForUndo= angular.copy($scope.Something.a);
  </code></pre>
  
  <p>Now, if the user clicks "Cancel", it gets:</p>
  
  <pre><code>$scope.Something.a = angular.copy($scope.copyForUndo);
  </code></pre>
  
  <p>But since then, the association seems to disappear. No matter, what changes the user now makes to Something.a, the view doesn't get updated.</p>
  
  <p>Why?</p>
  
  <p>I know, what the equality of objects is (for example, that <strong>{ object1: true } != {object1 : true}</strong> but still I cannot understand, why it doesn't work.</p>