- Hybrid Mobile Development with Ionic
- Gaurav Saini
- 90字
- 2021-07-02 23:53:49
Filters match pipes
Angular 4 pipes are similar to what we use Filters for in Angular 1. Pipes provide the same formatting and transformation for data in the template. Almost all of the inbuilt filters that Angular 1 has correspond to pipes in Angular 4:
// Filter - Angular 1
<td>{{movie.price | currency}}</td>
// Pipes in Angular 4
<td>{{movie.price | currency:'USD':true}}
</td>
Due to performance reasons, filter and orderBy filters have been removed from Pipes, although you can at anytime build a custom pipe if similar code is reused in multiple templates.
推薦閱讀
- Java范例大全
- Python入門很簡單
- 基于Java技術的Web應用開發
- SEO智慧
- Building Cross-Platform Desktop Applications with Electron
- Java EE 7 Development with NetBeans 8
- 自然語言處理Python進階
- Instant Nancy Web Development
- Service Mesh實戰:基于Linkerd和Kubernetes的微服務實踐
- ServiceNow:Building Powerful Workflows
- Unity 3D腳本編程:使用C#語言開發跨平臺游戲
- Hands-On Nuxt.js Web Development
- Microsoft 365 Certified Fundamentals MS-900 Exam Guide
- Distributed Computing in Java 9
- Practical Predictive Analytics