Skip to content

Instantly share code, notes, and snippets.

@WaseemTheDream
Last active August 29, 2015 13:58
Show Gist options
  • Save WaseemTheDream/9964063 to your computer and use it in GitHub Desktop.
Save WaseemTheDream/9964063 to your computer and use it in GitHub Desktop.
var serveryFilters = angular.module('serveryFilters', [])
serveryFilters.filter('dayofweek', function() {
return function(input) {
// Change this so that it return 'Sun' for input = 0 , 'Mon' for input = 1, .... , 'Sat' for input = 6
// Use the javascript switch statement to do this: http://www.w3schools.com/js/js_switch.asp
return input ? '\u2713' : '\u2718';
};
});
@WaseemTheDream
Copy link
Author

You can add another filter to the file by adding the following code:

serveryFilters.filter('filtername', function () {
  return function(input) {
    // Filter code goes here
  };
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment