| 1. |
What Is Parameterizing Pipe? |
|
Answer» A PIPE can ACCEPT any number of OPTIONAL parameters to achieve output. The parameter value can be any valid template expressions. To add optional parameters FOLLOW the pipe NAME with a colon (:). Its looks like- currency: 'INR' In the following example – <h2>The birthday is - {{ birthday | date:"MM/dd/yy" }} </h2> <!-- Output - The birthday is - 10/03/1984 --> A pipe can accept any number of optional parameters to achieve output. The parameter value can be any valid template expressions. To add optional parameters follow the pipe name with a colon (:). Its looks like- currency: 'INR' In the following example – <h2>The birthday is - {{ birthday | date:"MM/dd/yy" }} </h2> <!-- Output - The birthday is - 10/03/1984 --> |
|