Easy learning with example program codes

Angularjs custom filters tutorial

Angularjs custom filters:

AngularJS provides the facility to create the custom filters. Custom filters are created using “filter” function.

Example Explanation:

The ng-app directive initializes the application. We create a testFilter which reverse the string and capitalize the first letter.


<!DOCTYPE html>
 <div ng-app="testApp" ng-controller="appCtrl">
   Welcome to {{ name | testFilter }}
   var app = angular.module('testApp', []);
      app.controller('appCtrl', function($scope) {
          $ = "tutorialspointexamples"
      return function( str ) {
        var revStr = str.split('').reverse();
        return revStr[0].toUpperCase() + revStr.join('').slice(1);

Try it:

JS Bin on

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki