官术网_书友最值得收藏!

Filters and pipes in templates

AngularJS filters are now called as pipes in Angular. The filters are used after the pipe character (|) in AngularJS and there is no syntactical change in Angular. However, Angular calls the filters as pipes.

AngularJS:

<h1>Book Details:</h1> 
<p>{{vm.bookName}}</p> 
<p>{{vm.releaseDate | date }}</p> 

Angular:

<h1>Book Details:</h1> 
<p>{{bookName}}</p> 
<p>{{releaseDate | date }}</p> 

Notice we have applied a date pipe or filter to releaseDate and there is no syntactical change between AngularJS and Angular.

主站蜘蛛池模板: 慈利县| 会宁县| 如皋市| 资阳市| 鄯善县| 柯坪县| 麻栗坡县| 儋州市| 凤阳县| 泰兴市| 遂昌县| 昌宁县| 鱼台县| 荃湾区| 合山市| 福泉市| 开平市| 托里县| 杭州市| 利辛县| 梅州市| 清流县| 壤塘县| 尼玛县| 凤翔县| 土默特左旗| 盐津县| 巴中市| 南溪县| 阳城县| 滦平县| 岑巩县| 井研县| 西安市| 东安县| 凤冈县| 县级市| 三台县| 阳原县| 青海省| 门头沟区|