Code licensed under New BSD License.
This directive allow to liven your tables. It support sorting, filtering and pagination. Header row with titles and filters automatic generated on compilation step.
The following behaviours are depreciated and will be removed before the 1.0.0 release.
The 1.0.0 release is expected to land in 2-3 weeks.
Eventing no longer uses direct calls $scope.$emit. Instead a strongly typed pub/sub service (ngTableEventsChannel
) is used.
To migrate
Previously:
$scope.$on('ngTableAfterReloadData', yourHandler)
Now:
ngTableEventsChannel.onAfterReloadData(yourHandler, $scope)
Because of 1. above, NgTableParams
no longer requires a reference to $scope
.
A reference to $scope
was largely an internal requirement so there should be no code change required on your part.
The $defer
paramater supplied to your getData
method has been removed. Instead your getData
method should return an array or a promise that resolves to an array.
To migrate
Previously:
var tp = new NgTableParams({}, { getData: getData });
function getData($defer, params){
// snip
$defer.resolve(yourDataArray);
}
Now:
var tp = new NgTableParams({}, { getData: getData });
function getData(params){
// snip
return yourDataArrayOrPromise;
}
To migrate
Previously:
var tp = new ngTableParams();
Now:
var tp = new NgTableParams();
bower install ng-table
We use Karma to ensure the quality of the code. The easiest way to run these checks is to use grunt:
npm install -g grunt-cli
npm install && bower install
grunt
The karma task will try to open Firefox and Chrome as browser in which to run the tests. Make sure this is available or change the configuration in karma.conf.js
For a list of configuration options available, see Configuring your table with NgTableParams
See CHANGELOG.md
Please be responsible, the open source community is not there to guess your problem or to do your job. When submitting an issue try as much as possible to:
-
search in the already existing issues or on stackoverflow if your issue has not been raised before.
-
give a precise description mentionning angular version, ng-table version.
-
give a way to reproduce your issue, the best would be with a running example, you can use plunkr, or codepen. Tip: See below for a list of base codepen's you can fork
-
isolate your code sample on the probable issue to avoid pollution and noise.
-
Close your issue when a solution has been found (and share it with the community)
Note that 80% of the open issues are actually not issues but "problem" due to developpers laziness or lack of investigation. These "issues" are a waste of time for us and especially if we have to setup a sample to reproduce the issue which those developpers could have done. Any open issue which does not fulfill this contract will be closed without investigation.
- Demo site
- Codepen examples (Tip: fork these to create your own examples);
For work in IE < 9 need jQuery, just add:
<!--[if lt IE 9]>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<![endif]-->
Let me know if you are using ng-table. It will motivate me to work harder. And if you like ng-table, just email me and add your website here Hope you like it, Thanks! :)
This project is part of Bazalt CMS.