title: Angular ngRepeat: dupes error (although there are no duplicate keys)
body: <p>I am learning MEAN, and have encountered an Angular error. I am trying to display form data in a table, however the data isn't going through and the error I receive is:  </p>
  
  <blockquote>
    <p>angular.js:11500 Error: [ngRepeat:dupes]
    <a href="http://errors.angularjs.org/1.3.5/ngRepeat/dupes?p0=topic%20in%20topics%20%20%7C%20filter%3A%20filter_q&amp;p1=string%3Ap&amp;p2=p" rel="nofollow">http://errors.angularjs.org/1.3.5/ngRepeat/dupes?p0=topic%20in%20topics%20%20%7C%20filter%3A%20filter_q&amp;p1=string%3Ap&amp;p2=p</a>
        at Error (native)
        at</p>
  </blockquote>
  
  <p>In the index.html file I have:</p>
  
  <pre><code>discussion_board.controller('dashboardController', function($scope, usersFactory, topicsFactory){
        $scope.topics = [];
        $scope.users = [];
  
        topicsFactory.index(function(data){
          $scope.topics = data;
        })
  
        usersFactory.index(function(data){
          $scope.topics = data;
        })
  
        $scope.addtopic = function(){
          console.log("from controller)");
          topicsFactory.addTopic($scope.new_topic, function(topics){
            $scope.topics = topics;
            $scope.new_topic = {};
           });
        }
      })
  discussion_board.factory('topicsFactory', function($http){
      var factory = {};
      var users = [];
  
      factory.index = function(callback) {
        $http.get('/topics').success(function(output){
          callback();
        });
      }
  
      factory.addTopic = function(info, callback) {
        console.log("from factory");
        $http.post('/topics', info).success(function(output){
          callback();
        });
      }
  </code></pre>
  
  <p>And in the view file:</p>
  
  <pre><code>&lt;div ng-controller="dashboardController"&gt;
  &lt;h2&gt;Welcome {{username}} !&lt;/h2&gt;
  &lt;h5&gt;Search:
      &lt;input type="text" ng-model="filter_q" placeholder="search"&gt;
  &lt;/h5&gt;
  &lt;table class="table"&gt;
      &lt;tr&gt;
          &lt;th&gt;Category&lt;/th&gt;
          &lt;th&gt;Topic&lt;/th&gt;
          &lt;th&gt;User Name&lt;/th&gt;
          &lt;th&gt;Posts&lt;/th&gt;      
      &lt;/tr&gt;
      &lt;tr ng-repeat="topic in topics  | filter: filter_q"&gt;
          &lt;td&gt;{{topic.category}}&lt;/td&gt;
          &lt;td&gt;{{topic.name}}&lt;/td&gt;
          &lt;td&gt;{{topic.username}}&lt;/td&gt;
          &lt;td&gt;{{topic.posts}}&lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;/table&gt;
  </code></pre>
  
  <p>I have added track by $index in the ng-repeat. When added before the filter, it adds a bunch of empty rows to the table. When inserted after the filter, there is no change.</p>