Roadmap › AngularJS (1.x) — Legacy › Module: Fundamentals
Lessons in this course (13)

3. Expressions and filters

BasicMediumLesson 3 of 13
html
{{ price * qty | number:2 }}
{{ name | uppercase }}   {{ today | date:'dd-MMM-yyyy' }}   {{ amount | currency:'₹':0 }}
{{ items | limitTo:5 }}   {{ items | orderBy:'name':true }}   {{ items | filter:searchText }}
{{ data | json }}

Custom filter:

js
angular.module("shopApp").filter("statusLabel", () => status =>
  ({ paid: "✅ Paid", pending: "⏳ Pending" }[status] || status));

Filters in templates run on every digest — expensive filters on large ng-repeat lists hurt performance; pre-compute in the controller instead.