Introduction:
Here I will explain how to use AngularJS to use ng-repeat filter expression to filter JSON object values to show or hide or update elements with example or AngularJS filter json object in controller with ng-repeat filter expression values example. By using filter option in ng-repeat we can filter JSON object values to enable/disable or show/hide required elements from JSON object.
Description:
In previous articles I explained Angularjs ui grid cell template click event, bind dropdownlist in angularjs, Angularjs convert lower case to upper case while typing text, Angularjs refresh div for every 1 second using interval mode and many articles relating to AngularJS, jQuery, JavaScript and asp.net. Now I will explain how to filter JSON object using ng-repeat filter expression in using AngularJS.
In previous articles I explained Angularjs ui grid cell template click event, bind dropdownlist in angularjs, Angularjs convert lower case to upper case while typing text, Angularjs refresh div for every 1 second using interval mode and many articles relating to AngularJS, jQuery, JavaScript and asp.net. Now I will explain how to filter JSON object using ng-repeat filter expression in using AngularJS.
To filter JSON object using ng-repeat filter expressions in
AngularJS
we need to write the code like as shown below
$scope.checkvalues = function
(user) {
return user.id != "5";
}
|
If
you want to check it in complete example you need to write the code like as
shown below
|
Demo
If
you check below output it will display all values except id = 5
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
|
|||
0 comments :
Note: Only a member of this blog may post a comment.