Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我是 Angular 的新手,我试图在一个函数中声明gridOptionfor ng-grid,因为我不希望它在数据来自服务器之前触发。但如果我这样做,它会导致错误:
gridOption
ng-grid
TypeError: Cannot set property 'gridDim' of undefined
到底是怎么回事?
要在数据到达之前停止渲染,请执行以下操作
<div ng-if="contentAvailable"> <ng-grid/> </div>
当数据可用时,在您的控制器中设置 gridoptions 对象,然后设置 contentAvailable为 true。
contentAvailable