Forked from builtbylane/angular-remove-white-space-filter.js
Last active
August 29, 2015 14:25
-
-
Save danielchikaka/d9b493c29ace165d2495 to your computer and use it in GitHub Desktop.
AngularJS – filter: removes white space from text. useful for html values that cannot have spaces
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Description: | |
* removes white space from text. useful for html values that cannot have spaces | |
* Usage: | |
* {{some_text | nospace}} | |
*/ | |
app.filter('nospace', function () { | |
return function (value) { | |
return (!value) ? '' : value.replace(/ /g, ''); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment