我使用的是 ng-Grid v2.0.7,问题是 ng-grid 第一次显示时,它被最小化了。这是我的意思的图片:
只有点击最小化表格(上图)后,完整表格才能正常显示(下图)。 这是我正在使用的代码:
$scope.gridOptions = {
data: 'jsonData.value',
multiSelect: false
};
为什么会发生这种情况?
编辑:这是 html 文件中的定义:
<div class="gridStyle" ng-show="(dataViewType == 'table')" ng-grid="gridOptions"></div>
最佳答案
尝试在网格元素上使用 ng-cloak
指令。
例如在一个简单的 div 上:
<div ng-cloak></div>
"The ngCloak directive is used to prevent the Angular html template from being briefly displayed by the browser in its raw (uncompiled) form while your application is loading. Use this directive to avoid the undesirable flicker effect caused by the html template display."
关于javascript - AngularJS ng-Grid 启动最小化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19127675/