javascript - AngularJS ng-Grid 启动最小化?

标签 javascript angularjs ng-grid

我使用的是 ng-Grid v2.0.7,问题是 ng-grid 第一次显示时,它被最小化了。这是我的意思的图片:

enter image description here

只有点击最小化表格(上图)后,完整表格才能正常显示(下图)。 这是我正在使用的代码:

$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."

文档:http://docs.angularjs.org/api/ng.directive:ngCloak

关于javascript - AngularJS ng-Grid 启动最小化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19127675/

相关文章:

html - nggrid 表格高度修复为 18 像素错误

angularjs - 分页和列大小调整在 ui-grid v3.0.0-rc.11 中不起作用

javascript - 使用 Jquery-svg 的 SVG 可拖动的初始位置

javascript - 从后台切换回Safari时如何在iOS webapp中检测?

javascript - 未捕获错误 : EPERM: operation not permitted, 写入

javascript - react native : Why Does GraphQL Query With Apollo Return Undefined?

javascript - angularjs本地存储无法正常工作?

javascript - angularjs:如何在单元测试中模拟 $rootScope

javascript - AngularJS 将变量从自定义指令传递到模板

json - AngularJS 中带有 JSON 数据的动态 ng-Grid?