I'm new at angular, and I try to declare gridOption for ng-grid Within a function, because I want it not fire before the data come from the server.
But if I do so, it cause an error:
TypeError: Cannot set property 'gridDim' of undefined
To stop rendering till the data arrives do something like
<div ng-if="contentAvailable"> <ng-grid/> </div>
In you controller when the data is available setup the gridoptions object, followed by
contentAvailable to true.