How use fileters in angularjs
Filters perform data transformation. Typically they are used in conjunction with the locale to format the data in locale specific output.
index.html
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
<div ng-init= "list = ['iPhone ', 'HTC','Samaung','Nokia']">
Number formatting : {{1234567890 | number}} <br>
Array filtering <input ng-model="predicate">
{{ list | filter:predicate | json}}
</div>
</body>
</html>
refer : jsfiddle work place
Filters perform data transformation. Typically they are used in conjunction with the locale to format the data in locale specific output.
index.html
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
</head>
<body>
<div ng-init= "list = ['iPhone ', 'HTC','Samaung','Nokia']">
Number formatting : {{1234567890 | number}} <br>
Array filtering <input ng-model="predicate">
{{ list | filter:predicate | json}}
</div>
</body>
</html>
refer : jsfiddle work place
No comments:
Post a Comment