AngularJS pipe

From Wiki @ Karl Jones dot com
Revision as of 16:29, 2 January 2017 by 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....")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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>

See also

External links