(js) New 'range' filter for angular

pull/91/head
Francis Lachapelle 2015-07-23 15:22:50 -04:00
parent 194c5635b5
commit 2981b0af00
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
/* -*- Mode: javascript; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/**
* @type {angular.Module}
*/
(function () {
'use strict';
function range() {
return function(n) {
var res = [];
for (var i = 0; i < n; i++) {
res.push(i);
}
return res;
};
}
angular.module('SOGo.Common')
.filter('range', range);
})();