Angular - Pipes

A Pipe is used on html pages. It directs output of a function to another function. Good for formatting.

Here is an example of a pipe.

1
{{note.dt | date: 'dd/MM/yyyy h:mm a'}}

In this case, note.dt is what should be displayed. But it displays as a JavaScript standard date. The verticle bar is the pipe. So this will convert the date to a string that is formatted with the formatting code that follows.

1
{{reconcile.balanceEnding | currency:"USD":"symbol"}}

In this case we are converting the balanceEnding to a currency.