seimin 0e3bf6bf50 初始化 hace 3 años
..
demo 0e3bf6bf50 初始化 hace 3 años
scripts 0e3bf6bf50 初始化 hace 3 años
src 0e3bf6bf50 初始化 hace 3 años
test 0e3bf6bf50 初始化 hace 3 años
.bower.json 0e3bf6bf50 初始化 hace 3 años
.gitattributes 0e3bf6bf50 初始化 hace 3 años
.gitignore 0e3bf6bf50 初始化 hace 3 años
Gruntfile.js 0e3bf6bf50 初始化 hace 3 años
LICENSE 0e3bf6bf50 初始化 hace 3 años
README.md 0e3bf6bf50 初始化 hace 3 años
bower.json 0e3bf6bf50 初始化 hace 3 años
package.json 0e3bf6bf50 初始化 hace 3 años

README.md

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.

Demo

How to use angular truncate

###Include the javascript file.

<script src="truncate.js"></script>

###Inject the truncate filter into your app module.

var myApp = angular.module('myApp', ['truncate']);

###When outputting text, apply the filter.

 <p>
    {{ text | characters:25 }} or {{ text | words:5 }}
</p>

By default, a word will not be truncated. Set the optional boolean after the character count to true.

 <p>
     {{ text | characters:25 :true}}
 </p>