Name: angular-truncate
Owner: Two Sigma
Description: truncate text and add ellipses.
Created: 2016-02-17 16:08:12.0
Updated: 2016-02-17 16:08:13.0
Pushed: 2016-02-17 16:19:14.0
Homepage: null
Size: 5318
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This project is a filter for Angularjs to truncate text strings to a set number of characters or words and add ellipses when needed.
ipt src="truncate.js"></script>
truncate
filter into your app module.myApp = angular.module('myApp', ['truncate']);
{{ 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}}
>