This plunker populates a static Html Table correctly based on a 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 place this data in a NG-Grid.
This plunker attempts to load this data into NG Grid based on a Tim Search. I tried so many ways to do this. Should I be using ng-repeat? Ng-table instead of ng-grid?
$scope.source= arrItem;
$scope.getPagedDataAsync($scope.source, $scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage);
请在此处查看我的答案: 我可以通过ng-model使用输入的值来填充角度ng网格吗?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.