How to show messages when ngGrid have no values
Feb 20, 2014
ngGrid is a powerful grid system by AngularJS. But when binded data is empty, there’s no options to let ngGrid show any messages inside the grid.
I googled and found an issues here:
https://github.com/angular-ui/ng-grid/issues/496
He provides us a directive for us to use. I tried that but his code is not good. I wrote my own:
angular.module("grid.ext", []).directive('showEmptyMsg', function($compile, $timeout) { |
And you could use it like this:
<div class="gridStyle" ng-grid="gridOptions" show-empty-msg="No Results Found" grid-data="myGridData"> |