Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Ng Grid在更新时闪烁Grid_Javascript_Angularjs_Ng Grid - Fatal编程技术网

Javascript Ng Grid在更新时闪烁Grid

Javascript Ng Grid在更新时闪烁Grid,javascript,angularjs,ng-grid,Javascript,Angularjs,Ng Grid,当使用ng网格时,我有一个服务器和一个网格。如果我单击一行,另一个网格中的数据将更新。但当这种情况发生时,所有先前的数据都消失了,留下一个1/2秒的空白网格。要更新,我只使用$http.get $http.get(afHttp.baseUrl + "/" + $scope.name + "/" + part) .success(function(data) { $scope.data = data; })

当使用ng网格时,我有一个服务器和一个网格。如果我单击一行,另一个网格中的数据将更新。但当这种情况发生时,所有先前的数据都消失了,留下一个1/2秒的空白网格。要更新,我只使用$http.get

$http.get(afHttp.baseUrl + "/" + $scope.name + "/" + part)
            .success(function(data) {
                $scope.data = data;
            })
        ;
有没有办法解决这个问题?当我加上

var lastRoute = $route.current;
    $scope.$on('$locationChangeSuccess', function(event) {
        $route.current = lastRoute;
    });

它更新得很好,但是我无法导航到任何其他页面,所以这不是解决方案。我想更新几乎没有任何刷新即时。这可能吗

$scope.data是网格中绑定到的对象吗?您可能需要展开您的问题,并显示如何配置ng grid的详细信息。@davin$scope.data与$scope.options.data中的值相同