I have tried making a rest call with $http via die ui-grid(v3.0.0-rc.20-8199eb5) field function approach. See example below.
$scope.gridOptions = {
enableSorting: true,
columnDefs: [
{ name:'name', field: 'name' },
{ name:'getDepartment', field: 'getDepartment()', enableCellEdit:false}
],
data : [ {
"name": "Rex",
"getDepartment" : function() {return deparmentService.findByName(this.name);}
}
]
};
}]);
The browser goes into a infinite loop. The departmentService $http call is dependent on a name parameter begin passed to it.
How can I make a $http ajax call from within the ui-grid when it is loading rows?