This plunker successfully populates a static HTML Table with data related to the search term 'Tim' from 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 am attempting to display this data in an NG-Grid.
This plunker demonstrates my efforts to load the Tim Search results into an NG Grid. I have tried various methods without success. Currently, I am trying to assign arrItem to $scope.source and then pass it into getPagedDataAsync. Any suggestions?
$scope.source= arrItem;
$scope.getPagedDataAsync($scope.source, $scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);