Skip to content

Instantly share code, notes, and snippets.

@Sharondio
Created January 22, 2014 17:38
Show Gist options
  • Save Sharondio/8563315 to your computer and use it in GitHub Desktop.
Save Sharondio/8563315 to your computer and use it in GitHub Desktop.
A simple string filter to format zeros and nulls to dash.
angular.module('my-app', [])
.filter('dash', function() {
return function(input) {
return input ? input : '-';
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment