I am getting RangeError: Maximum call stack size exceeded with filter option in angularjs array of objects. Without filte option , its working fine.
HTML :
<div class="searchBar">
<input type="text" class="form-control" placeholder="Search" ng-model="searchPayment">
<i class="fa fa-search fa-2x"></i>
</div>
<div class="payment col-xs-12" ng-repeat="payment in payments | filter:{ 'name':searchPayment}">
<div class="col-xs-8">
<div class="section">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="payment.checked">
<h5>[[payment.name]]</h5>
</label>
</div>
</div>
</div>
</div>
and controllrt.js :
$scope.payments = [{
"collection": "105.00",
"customerEmail": "[email protected]",
"date": "10\/7\/2016 12:00:00 AM",
"lan": "JAX15E0140",
"name": "Rrts",
"passThru": "105.00",
"passThruId": "7357ac197",
"recovery": "0.00",
"source": "APTA",
"status": "0"
}, {
"collection": "6000.00",
"customerEmail": "[email protected]",
"date": "12\/7\/2016 12:00:00 AM",
"lan": "JAI47",
"name": "Test23:41:40.635",
"passThru": "6000.00",
"passThruId": "6f96d57eca9b9",
"recovery": "0.00",
"source": "ABA",
"status": "0"
}, {
"collection": "1.50",
"customerEmail": "[email protected]",
"date": "12\/17\/2015 12:00:00 AM",
"lan": "H132",
"name": "REPOT",
"passThru": "0.00",
"passThruId": "fbc51ae681c96",
"recovery": "400.00",
"source": "ABHTA",
"status": "0"
}, {
"collection": "2500.00",
"customerEmail": "[email protected]",
"date": "12\/18\/2016 12:00:00 AM",
"lan": "JAI1551",
"name": "Test I55.559",
"passThru": "2500.00",
"passThruId": "4beb3ad2c176e3bd",
"recovery": "0.00",
"source": "ABTA",
"status": "0"
}, {
"collection": "3500.00",
"customerEmail": "[email protected]",
"date": "12\/18\/2016 12:00:00 AM",
"lan": "JAI1",
"name": "Test Indust:55.559",
"passThru": "3500.00",
"passThruId": "edb23c1e305550",
"recovery": "0.00",
"source": "AA",
"status": "0"
}]
This is what getting in console. Can anyone help to remove this error while using filter option ?