问题
When using ng-grid I have a server and a grid. If I click a row data in another grid will update. But when this happens all of the previous data disappears leaving a blank grid for 1/2 a second. To update I am just using $http.get.
$http.get(afHttp.baseUrl + "/" + $scope.name + "/" + part)
.success(function(data) {
$scope.data = data;
})
;
Is there any way of fixing this? when I add
var lastRoute = $route.current;
$scope.$on('$locationChangeSuccess', function(event) {
$route.current = lastRoute;
});
It updates fine, but then I cannot navigate to any other page, so this is no solution. I want the update almost instant without any refresh. Is this possible?
来源:https://stackoverflow.com/questions/18422136/ng-grid-flickers-grid-when-updating