title: Avoiding Dupes when pushing values from form to array in AngularJS
body: <p>I'm having problems avoiding dupes with my code.  Here is a simplified example.  I know the problem is in the array object being a reference of the same scope variable, but what is the best way to avoid it?</p>
  
  <pre><code>&lt;div ng-app="myApp"&gt;
    &lt;div ng-controller="myCtrl"&gt;
      &lt;input type="text" ng-model="item" /&gt;
      &lt;div ng-repeat="item in items"&gt;
        {{ item }}
      &lt;/div&gt;
      &lt;button ng-click="save()"&gt;Save&lt;/button&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;script&gt;
    angular.module('myApp', []).
    controller('myCtrl', function ($scope) {
      $scope.items = [];
      $scope.save = function() {
        $scope.items.push($scope.item);
      }
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is a fiddle that demonstrates the problem:
  <a href="http://jsfiddle.net/u8Fuk/8/" rel="nofollow">http://jsfiddle.net/u8Fuk/8/</a></p>