Difference between revisions of "AngularJS pipe"
From Wiki @ Karl Jones dot com
Karl Jones (Talk | contribs) (Created page with "In AngularJS, a '''pipe''' takes some data, transforms it, and outputs the transformed data. == Description == Use pipes in AngularJS templates with interpolation....") |
(No difference)
|
Revision as of 15:29, 2 January 2017
In AngularJS, a pipe takes some data, transforms it, and outputs the transformed data.
Description
Use pipes in AngularJS templates with interpolation. Example:
<p>User created on {{created_at | date }}</p>
To indicate a parameter in a pipe, use a colon. Example:
<p>User created on {{created_at | date:"MM/dd/yy" }}</p>
Pipes can be chained together. Example:
<p>User created on {{created_at | date | uppercase }}</p>