pipe

slice管道,对数组进行截取,取值范围[a,b)

如果你数学基础还可以,[a,b)你应该知道是个什么情况
eg:

[1,2,3,4,5]|slice(1,3) //2,3
[1,2,3,4,5]|slice(-3) //3,4,5
[1,2,3,4,5]|slice(-3,-1) //3,4

超出范围则When operating on a blank value, the pipe returns the blank value.

date

和angular.js使用方法一样

json 同上

async 见rxjs章节

currency 返回的是$,一般不会用

percent和number用法一样

uppercase lowercase tittlecase

<p>{{"XiongWei"|uppercase}}</p>
<p>{{"XiongWei"|lowercase}}</p>
<p>{{"XiongWei"|titlecase}}</p>
<p>{{3.1415|number:'.2-2'}}</p>
<p>{{0.758|percent:'.2-2'}}</p>
<p>{{18.52|currency}}</p>

posted @ 2017-06-25 03:40  judy201654321  阅读(239)  评论(0编辑  收藏  举报