seimin 55b3368751 项目初始化 лет назад: 3
..
demo 55b3368751 项目初始化 лет назад: 3
scripts 55b3368751 项目初始化 лет назад: 3
src 55b3368751 项目初始化 лет назад: 3
test 55b3368751 项目初始化 лет назад: 3
.bower.json 55b3368751 项目初始化 лет назад: 3
.gitattributes 55b3368751 项目初始化 лет назад: 3
.gitignore 55b3368751 项目初始化 лет назад: 3
Gruntfile.js 55b3368751 项目初始化 лет назад: 3
LICENSE 55b3368751 项目初始化 лет назад: 3
README.md 55b3368751 项目初始化 лет назад: 3
bower.json 55b3368751 项目初始化 лет назад: 3
package.json 55b3368751 项目初始化 лет назад: 3

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>