Angular 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.
How to use angular truncate
Include the javascript file.
truncate
filter into your app module.
Inject the var myApp = angular;
When outputting text, apply the filter.
{{ 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.
{{ text | characters:25 :true}}