In HTML Template Binding(在HTML的模板绑定中)
{{ limitTo_expression | limitTo : limit : begin}}
In JavaScript
$filter('limitTo')(input, limit, begin)
如:
{{"2017-01-20 15:16:30"|limitTo:10}}
显示为:2017-01-20
填写负值为从后往前截取,如:
{{"2017-01-20 15:16:30"|limitTo:-8}}
显示为:15:16:30
begin参数用于控制从哪里开始截取,如:
{{"2017-01-20 15:16:30"|limitTo:5:5}}
显示为:01-20
截取字符串,判断是否填充
{{row.describe | limitTo:20}} {{row.describe.length>20?'...':''}}