Created
August 9, 2016 15:10
-
-
Save niccolomineo/8a9c14d98ed729a98ce003cb48a3963b to your computer and use it in GitHub Desktop.
AngularJS - Filter - Join
This file contains 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
// Filter: removes all non alphanumerical characters from input | |
myApp.filter('join', function() { | |
return function(input) { | |
input = input || ''; | |
var output = input.replace(/\W/g, ''); | |
return output; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment