AngularJS duplicate rows error
<p>When I want to add the same information it warm me an error of duplicates row.</p>

<p>This problem it comes from $scope.showSal and ng-repeat="rows in showSal".</p>

<p>If I use ng-repeat="rows in showSal track by $index" I can not add duplicate rows and I need it.</p>

<p>How I can make to parse and add duplicates? I tried to make JSON data, but it take error even I use stringify and parse method... maybe I doesn't implemented too well the parsing...</p>

<p>PS: I need to parse an array of objects.</p>

<p>HTML file:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
    &lt;head&gt;
        &lt;title&gt;Research project&lt;/title&gt;
        &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
        &lt;script src="js/app/research.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body ng-app="testApp" ng-controller="mainCtrl"&gt;
        &lt;table&gt;
            &lt;thead&gt;
                &lt;tr&gt;
                    &lt;th&gt;Nr.&lt;/th&gt;
                    &lt;th&gt;An&lt;/th&gt;
                    &lt;th&gt;Den&lt;/th&gt;
                &lt;/tr&gt;
            &lt;/thead&gt;
            &lt;tbody&gt;
                &lt;tr ng-repeat="rows in showSal"&gt;
                    &lt;td&gt;{{rows.id}}&lt;/td&gt;
                    &lt;td&gt;{{rows.an}}&lt;/td&gt;
                    &lt;td&gt;{{rows.den}}&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/tbody&gt;
        &lt;/table&gt;

        &lt;form id="add-content" ng-controller="addInfoCtrl" ng-submit="addInfoDb()"&gt;
                &lt;br/&gt;
                &lt;div class="controls"&gt;
                        &lt;button type="submit" style="width: 220px;"&gt;Adauga salariu&lt;/button&gt;
                &lt;/div&gt;
        &lt;/form&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>JavaScript file:</p>

<pre><code>var app = angular.module("testApp", []);

app.controller('mainCtrl', ['$scope', '$sce', '$document', function($scope, $sce, $document) {  
    $scope.showSal = [
        { id: '1', an: '2016', den: 'Oracle' },
        { id: '2', an: '2016', den: 'Oracle' }
    ];
}]);

app.controller('addInfoCtrl', ['$scope', function($scope) { 
    $scope.testAdd = { id: '100', an: '2016', den: 'Oracle' }

    $scope.addInfoDb = function() {
        $scope.showSal.push($scope.testAdd);
        console.log($scope.showSal.length);
    }
}]);
</code></pre>