Angular Truncate - Ellipsis for your templates
npm install angular-ng-truncateAngular Truncate
---------
This project is a filter for Angularjs to truncate text strings to a set number of characters or words and
add ellipses when needed.
Demo
html
`
###Inject the truncate filter into your app module.
`javascript
var myApp = angular.module('myApp', ['truncate']);
`
###When outputting text, apply the filter.
`html
{{ text | characters:25 }} or {{ text | words:5 }}
`
By default, a _word_ will not be truncated. Set the optional boolean after the character count to true.
`html
{{ text | characters:25 :true}}
``