Last active
October 29, 2017 04:36
-
-
Save sanusart/9031706 to your computer and use it in GitHub Desktop.
AngularJS join by character #AngularJS #javascript #angular1
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
angular.module('App.filters', []) | |
.filter('joinBy', function () { | |
return function (input,delimiter) { | |
return (input || []).join(delimiter || ','); | |
}; | |
}); |
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
{{ itemsArray | joinBy:',' }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment