- 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.
推薦閱讀
- Spring 5.0 By Example
- 前端跨界開發(fā)指南:JavaScript工具庫原理解析與實戰(zhàn)
- 實戰(zhàn)Java程序設(shè)計
- 面向STEM的Scratch創(chuàng)新課程
- 數(shù)據(jù)結(jié)構(gòu)簡明教程(第2版)微課版
- 游戲程序設(shè)計教程
- Java程序設(shè)計入門
- RealSenseTM互動開發(fā)實戰(zhàn)
- Julia for Data Science
- 智能搜索和推薦系統(tǒng):原理、算法與應(yīng)用
- Mastering Adobe Captivate 7
- C語言程序設(shè)計
- Learning Image Processing with OpenCV
- Drupal 8 Development:Beginner's Guide(Second Edition)
- C語言程序設(shè)計與應(yīng)用實驗指導(dǎo)書(第2版)