When to use angular JS ng-repeat?
This plunker correctly populates a static HTML table based on the search for "Tim" (Json Data).
var arrItem = [];
angular.forEach($scope.items, function (item) {
if(item.fname === enteredValue.firstName || item.lname === enteredValue.lastName
||item.address === enteredValue.address && item.phone === enteredValue.phone){
arrItem.push({
first: item.fname,
last: item.lname,
address: item.address,
phone: item.phone
});
Now I want to put this data into NG-Grid.
This plunker tries to load this data into the NG grid based on a search by tim. I have tried so many ways to do this. Should I use ng-repeat? Ng table instead of ng grid?
$scope.source= arrItem;
$scope.getPagedDataAsync($scope.source, $scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);
+3
source to share