Ng-Grid flickers grid when updating

試著忘記壹切 提交于 2019-12-11 11:21:28

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!