I am working on an Angular App that gets some data from a web server as JSON and shows that in a list using ng-repeat. Now, dynamically, I want to add more data to that array which is used by ng-repeat. I use another function and get more data and append that to the array using
$scope.MyArrayName.push.apply($scope.MyArrayName, newDataArray)
But after that the filter stops working. The filter is as following.
<a class="item item-thumbnail-left item-text-wrap" href="#/main/postDetail/{{post.id}}" ng-repeat="post in MyArrayName | filter: {title:searchText}">
where searchText is an input of type text with ng-model="searchText".
Please note that the filter works just perfect before adding new data to the array. But stops afterwards.
Any help is highly appreciated.