Recently started working with Angular and ng-grid, encountering an issue while trying to display a simple static json file in the grid. The error message shown is:
Cannot set property 'grid' of undefined
Seeking assistance from experts out there.
My code snippet:
angular.module('healthyLivingApp')
.controller('SubscribersCtrl', function ($scope,$http) {
$http.get('http://localhost:9000/subscribers.json').success(function(data){
$scope.subscribers = data;
});
$scope.gridOptions = {
data:'subscribers'
}
});
app.js
.module('healthyLivingApp', [
'ngAnimate',
'ngResource',
'ngRoute',
'ngSanitize',
'ngTouch',
'ngGrid',
'ui.bootstrap'
])
HTML
<h1>Subscribers</h1>
<div class="gridStyles" ng-grid="gridOptions">
</div>
The technology stack includes bower, Angular "1.3.12", ng-grid "2.0.14", jQuery "2.1.3"