- Expert Angular
- Mathieu Nayrolles Rajesh Gunasundaram Sridhar Rao
- 77字
- 2021-07-15 17:05:36
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.
推薦閱讀
- 數據結構和算法基礎(Java語言實現)
- Hands-On Data Structures and Algorithms with JavaScript
- React Native Cookbook
- RTC程序設計:實時音視頻權威指南
- NumPy Essentials
- 基于Swift語言的iOS App 商業實戰教程
- Learning Apache Mahout Classification
- Unity Game Development Scripting
- Android驅動開發權威指南
- Julia數據科學應用
- PyQt編程快速上手
- Scratch從入門到精通
- Mastering JavaScript
- HTML5移動前端開發基礎與實戰(微課版)
- Flink入門與實戰