Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- angular.module('Filters', [])
- .filter('reverse', function () {
- var _this = this;
- this.counter = 0;
- return function (input) {
- var result = '';
- for (var i = 0; i < input.length; ++i)
- result = input[i] + result;
- return ++_this.counter + ' ' + result;
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement