javascript - how to get ng-grid in modal working? -
i tryin nggrid working in modal:
$scope.open = function() { $modal.open({ templateurl: 'mymodalcontent.html', backdrop: true, windowclass: 'modal', controller: function($scope, $modalinstance) { $scope.submit = function() { $modalinstance.dismiss('cancel'); } $scope.cancel = function() { $modalinstance.dismiss('cancel'); }; } }); };
but getting error:
typeerror: cannot set property 'griddim' of undefined
plunkr ref:http://plnkr.co/edit/2cijicdra2k3nqew7w56?p=preview
see plunker,
http://plnkr.co/edit/t22v7ma8rwsqick5oimg?p=preview
i believe mistake had added data , ng-grid initialisation not within scope of $modal, if @ plunkr moved scopes inside controller of $modal , worked.
Comments
Post a Comment