$filter
is a service used to format the expression. In this example, we need to inject controller with $filter
service. We are assigning learnkode to originalText variable and the $filter('uppercase')($scope.originalText) will convert learnKode to uppercase. $scope.originalText
= 'learnkode'; $scope.filteredText
= $filter('uppercase')($scope.originalText); See the code snippet: