| character is used to apply pipes in Angular 2. Pipes are very similar to filters in AngularJS in that they both help to transform the data into a specified format.
|metadata for pipe, must immediately precede pipe class
|what you will use inside the template
|defaults to true, mark this as false to have your pipe re-evaluated more often
|transform( value, args? )
|the function that is called to transform the values in the template
|the value that you want to transform
|the arguments that you may need included in your transform. Mark optional args with the ? operator like so transform(value, arg1, arg2?)
This topic covers Angular2 Pipes, a mechanism for transforming and formatting data within HTML templates in an Angular2 application.