An AngularJS truncation filter, that truncates text strings to a set number of characters with a custom ellipsis.
###Include the javascript min file within your HTML.
<script src="src/truncate.min.js"></script>
angular.module('App', ['truncate']);
Truncate filter takes 3 parameters:
truncate:numberOfCharacters:wordBreak:customEllipsis
{{ scopeVariable | truncation:10:true:"---" }}
ng-repeat="word in scopeVariable | truncate:5:true"
By default, a standard "..." will be used if a custom ellipsis is not passed.
{{ scopeVariable | truncation:10 }}
- Word truncation