A filter to extract limit
elements beginning at offset
out of an array.
- Copyright:
- Kiwigrid GmbH 2014-2015
- Source:
Examples
{{ row | orderObjectBy:['col1', 'col2'] }}
{{ row | orderObjectBy:['col1', 'col2']:true }}
angular.module('exampleApp', ['keta.filters.OrderObjectBy'])
.controller('ExampleController', function($scope) {
// return object values in given order (all other values are dismissed)
$scope.orderedProps = $filter('ketaOrderObjectBy')($scope.row, ['col1', 'col2']);
// return object keys in given order (all other keys are dismissed)
$scope.orderedProps = $filter('ketaOrderObjectBy')($scope.row, ['col1', 'col2'], true);
});