Filter Example 1

You might also like

You are on page 1of 1

<!

DOCTYPE html>
<html>
<script type="text/javascript"
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.2/angular.min.js"></script
>
<body>
<div ng-app="myApp" ng-controller="personCtrl">
<p>The name is {{firstName | lowercase}} {{ lastName | uppercase }}</p>
<p>The Amount1 is {{ Amount1 | number }}</p>
<p>The Amount2 is {{ Amount2 | number:2 }}</p>
<p>The Amount2 is {{ Amount4| currency :'Rs'}}</p>
<p>The Amount3 is {{ Amount5 | currency :'yen':4 }}</p>

<p>The Amount1 is {{ Amount1 | date }}</p>


<p>The Amount1 is {{ Amount1 | date:'short' }}</p>
<p>The Amount1 is {{ Amount1 | date:'longDate' }}</p>
<p>The Amount1 is {{ Amount1 | date:'yyyy' }}</p>

</div>

<script>
angular.module('myApp', []).controller('personCtrl', function($scope) {
$scope.firstName = "MEHAK",
$scope.lastName = "Imtiaz",
$scope.Amount1 = "100",
$scope.Amount2 = "200"
$scope.Amount4 = "200"
$scope.Amount5 = "300.000"
$scope.Amount1 = "1459999999999"

});
</script>
</body>
</html>

You might also like