title: Array push, duplicate elements
body: <p>This is my HTML:</p>
  
  <pre><code>&lt;body ng-app="app"&gt;
  
  &lt;div ng-controller="AppController as vm"&gt;
  
      &lt;form name="testForm" ng-submit="vm.submit(vm.message)" class="form-group"&gt;
          &lt;textarea ng-model="vm.message.text" placeholder="text" class="form-control"&gt;&lt;/textarea&gt;
          &lt;input type="hidden" ng-model="vm.message.date"&gt;
          &lt;input type="submit" class="btn btn-primary"&gt;
      &lt;/form&gt;
  
      &lt;table class="table table-stripped table-bordered"&gt;
          &lt;tr ng-repeat="message in vm.messages track by $index"&gt;
              &lt;td&gt;{{ message.text }}&lt;/td&gt;
              &lt;td&gt;{{ message.date }}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>This is my controller:</p>
  
  <pre><code>    (function(){
      'use strict';
  
      angular.module('app', [
          'ngRoute'
      ]).controller('AppController', AppController);
  
      function AppController() {
  
          var vm = this;        
          vm.submit = submit;                
          vm.messages = [];
  
          function submit(elem) {
              elem.date = new Date();
              vm.messages.push(elem);
          }  
  
      }
  })();  
  </code></pre>
  
  <p>I don't get it, whenever I enter and submit a <em>message</em> object, all the objects inside the <em>vm.messages</em> array become that object.</p>
  
  <p>I want to save all the objects inside the array without any change. What am I doing wrong?    </p>