AngularJS Tutorial - Convert Expression with chained Filters








The following code shows how to convert Expression with chained Filters.

Example

Angular uses the | (pipe) character to combine filters with variables in expressions.


<!--   w w w. j a va  2  s .  co  m-->

<!doctype html>
<html ng-app>
<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js"></script>
  </head>
  <body ng-app>
    Enter your name: <input type="text" ng-model="name">
    <p>Hello {{name | uppercase | lowercase }}!</p>
  </body>
</html>

The code above is rendered as follows: