- 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 Machine Learning with scikit:learn and Scientific Python Toolkits
- Learning Flask Framework
- 信息技術應用基礎
- iOS編程基礎:Swift、Xcode和Cocoa入門指南
- 軟件品質之完美管理:實戰經典
- Terraform:多云、混合云環境下實現基礎設施即代碼(第2版)
- Windows Embedded CE 6.0程序設計實戰
- Spring Boot+MVC實戰指南
- Hands-On Kubernetes on Windows
- Java Web應用開發項目教程
- 零基礎學HTML+CSS
- Python編程基礎教程
- Practical Responsive Typography
- Windows 10 for Enterprise Administrators