Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

Uppercase Filters in Angularjs: The Filter in Angularjs

Understand Uppercase Filters in Angularjs: The Filter in Angularjs with clear explanations, practical examples, and useful tips. This updated guide covers...

Table of Contents

Uppercase Filters in Angularjs: The Filter in Angularjs is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.

Filter helps change, filtering data to result in another string. Below is a list of common filters commonly used in AngularJS.

  • uppercase: Convert text to uppercase.
  • lowercase: Convert text to lowercase.
  • currency: Currency format format text.
  • filter: Filter the array, the result is a substring based on the conditions provided.
  • orderby: Arrange arrays based on the information provided

Uppercase filter in AngularJS

Add uppercase filter to an expression, according to the usage below, the student's name field results will be printed in all letters.

 Enter last name: < input type = "text" ng - model = "sinhvien.ho" > Enter the name : < input type = "text" ng - model = "sinhvien.ten" > Print name: {{ sinhvien . hoten () | uppercase }} 

Lowercase filter in AngularJS

Add a lowercase filter to an expression. Below is an example for the filter with the output being all lowercase characters.

 Type : < input type = "text" ng - model = "sinhvien.ho" > Copy ten : < input type = "text" ng - model = "sinhvien.ten" > Ten transactions : {{ studentvien . hoten () | lowercase }} 

Currency filter in AngularJS

Add the currency filter to an expression. Below is an example for the currency filter that returns results in currency format.

 Non-standard : < input type = "text" ng - model = "sinhvien.hocphi" > hocphi : {{ sinhvien . hocphi | currency }} 

Filter filter in AngularJS

To display only the required Subjects, we use tenMonHoc as a filter.

 Monology : < input type = "text" ng - model = "tenMonHoc" > Mon study : < query - repeat = "printable version ten + ', diemthi:' + monhoc . diemthi }} li > ul > 

Filter orderby in AngularJS

To sort Subjects by score, we use orderBy diemthi.

 Mon learn :  {{ monhoc . ten + ', diemthi:' + monhoc . diemthi }} li > ul > 

Example AngularJS

Here is a complete example of the filters illustrated above:

 Filter trong AngularJS  src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js" > 

 

 Ví d? v? AngularJS t? QTM  ng-app = "mainApp" ng-controller = "studentController" >  border = "0" > Nh?p tên:  type = "text" ng-model = "student.firstName" > Nh?p h?:  type = "text" ng-model = "student.lastName" > Nh?p h?c phí:  type = "text" ng-model = "student.fees" > Nh?p môn h?c:  type = "text" ng-model = "subjectName" > 
border = "0" > Tên in hoa: {{student.fullName() | uppercase}} Tên vi?t th??ng: {{student.fullName() | lowercase}} H?c phí: {{student.fees | currency}} Môn h?c: ng-repeat = "subject in student.subjects | filter: subjectName |orderBy:'diem'" > {{ subject.name + ', diem:' + subject.diem }}

Next lesson: Create a table in AngularJS

FAQ

What should you know about uppercase filter in AngularJS?

Add uppercase filter to an expression, according to the usage below, the student's name field results will be printed in all letters.

What should you know about lowercase filter in AngularJS?

Add a lowercase filter to an expression. Below is an example for the filter with the output being all lowercase characters.

What should you know about currency filter in AngularJS?

Add the currency filter to an expression. Below is an example for the currency filter that returns results in currency format.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.