JS: AngularJS Truncate Filter for Words and Characters. Adapted from https://github.com/sparkalow/angular-truncate