ngRepeat: Dupes when posting data with angular
NickName:dallas Ask DateTime:2017-05-26T21:10:30

ngRepeat: Dupes when posting data with angular

I am working on submitting a form to a query on a php page and returning a table of data. If I don't submit parameters, this works great. However if I try to add parameters to the post (to be used in the query), I receive an ngRepeat:Dupes error.

Any ideas as to what could cause this? Still relatively new to angular

$http.post(url ,// Application module
var reportRequest = angular.module('reportRequest',[]);

reportRequest.controller('reportRequest', function($scope, $http) {

    // create a blank object to handle form data.
    $scope.report = {};

    // calling our submit function.
    $scope.submitForm = function() {
        // Posting data to php file    
        $http.post(url, {
            "selectPerson" : $scope.report.firstname
        }).success(function(data){
            // Stored the returned data into scope 
            $scope.people= data;
            console.log(data);
        });
    };
});
<table class="table table-hover">
<tr>
<th>First Name</th>
<th></th>
<th></th>
</tr>
<tr ng-repeat="person in people track by $index | filter:search_query">
<td><span>{{person.firstname}}</span></td>
</tr>
</table>

Copyright Notice:Content Author:「dallas」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/44202508/ngrepeat-dupes-when-posting-data-with-angular

More about “ngRepeat: Dupes when posting data with angular” related questions

ngRepeat: Dupes when posting data with angular

I am working on submitting a form to a query on a php page and returning a table of data. If I don't submit parameters, this works great. However if I try to add parameters to the post (to be used...

Show Detail

Angular - Error: [ngRepeat:dupes] when using $http to get data

Hi I just started using AngularJs, I am having issue when using $http to get data and $scope.productInfos = data returns Error: [ngRepeat:dupes], below is my code: $scope.processForm = function(fo...

Show Detail

ngRepeat:dupes when nothing is duplicated

I am in the process of learning Angular and have run into an error: Error: [ngRepeat:dupes] http://errors.angularjs.org/1.2.5/ngRepeat/dupes?p0=skill%20in%20skills%20%7C%20filter%3Asearch&amp;p1=s...

Show Detail

Getting an error when populating a list with angular, ngRepeat:dupes

So i am getting the error: ngRepeat:dupes i am getting the error when i am populating the list with angular. I have tried to use the track by index but when i use this i get another error, and still

Show Detail

Angular ngRepeat: dupes error (although there are no duplicate keys)

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: angular.js:11500 Error: [

Show Detail

Angular Error: [ngRepeat:dupes]

I get the following error Error: [ngRepeat:dupes]. &lt;tbody&gt; &lt;tr data-ng-repeat="row in data"&gt; &lt;td&gt;{{row.id}}&lt;/td&gt; &lt;td&gt;{{row.string}}&am

Show Detail

Why I get error Error: [ngRepeat:dupes] in Angular JS?

I use ng-repeat: &lt;option ng-selected="key == formData.city" ng-repeat="(key, value) in data.cities | orderBy:value" value="{{key}}"&gt;{{value}}&lt;/option&gt; data.cities is array. &#

Show Detail

AngularJS Error: [ngRepeat:dupes]

I am getting JSON data with PHP but on ng-repeat getting error: [ngRepeat:dupes] Duplicates in repeater are not allowed I tried to track by $index but every time browser crashing with track by $i...

Show Detail

Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed

I have a similar situation as described here but I use a $http call to get my data to build a infinite scrolling table, and get: Error: [ngRepeat:dupes] Duplicates in a repeater are not allowed. U...

Show Detail

Yet another AngularJS Error: ngRepeat:dupes

I am playing around with Angular and I have stumbled on another issue. I am trying to pull data from an external js file and I received the 'Error: ngRepeat:dupes' error. &lt;div class="productRow...

Show Detail