Five --- filter core concept of Angular

The Filter: filters for displaying presentation format to another data in the view; the nature of the filter is a function that receives the raw data output converted to the new format:

function(oldVal){ ... return newVal }

    Using a filter: {{e.salary | filter name}}

    Angular2.x, the filter renamed "pipe (Pipe)"

    Step pipe custom:

    1. Create a pipeline class, achieve conversion

    2. registration ducts in the module

    3. In the Template

Guess you like

Origin www.cnblogs.com/sna-ling/p/12158043.html