title: Ng-grid Cannot set property 'gridDim' of undefined
body: <p>I'm new in Angular, and I try to declare gridOption for ng-grid Within a function in costroller. </p>
  
  <p>It cause an error:</p>
  
  <p>TypeError: Cannot set property 'gridDim' of undefined</p>
  
  <p>I tried to solve it using $scope.apply and ng-if in template. But nothing from this is working for me. </p>
  
  <p>Thanks for any advice:</p>
  
  <p>method of the Controller:</p>
  
  <pre><code>$scope.getTest = function() {
  
      $http.get('http://www.iNorthwind.com/Service1.svc/getAllCustomers')
      .success(function (data, status, headers, config) {
              //$scope.myData = data;
              console.log('Sucess' + data);
              // definition for ng-grid table 
              $scope.myData = [{ name: "Moroni", age: 50 },
                               { name: "Tiancum", age: 43 },
                               { name: "Jacob", age: 27 },
                               { name: "Nephi", age: 29 },
                               { name: "Enos", age: 34}];
              $scope.gridOptions = { data: 'myData' };
              //$scope.$apply();
      })
      .error(function(data, status, headers, config) {
              $scope.myData = data;
      });
  
  };
  </code></pre>