How to Filter data in Angular JS
- < h3 > Filter data using Angular JS < / h3 >
- In the post I will show youÂ How to Filter data in Angular JS.
- In the post we saw how to filter data in AngularJS. I hope this post is useful to the developers.Â Happy programming!!
- Angular JS angularjs filter data , Filter Data AngularJS , How to Filter data in Angular JS
- How to #Filter data in #AngularJS #Dotnetsnippets Click To Tweet
How to Filter data in Angular JS.Here we would filter data in AngularJS. Data filter can be done with much ease in AngularJS.
@dotnetsnippets: How to Filter data in Angular JS
In the previous posts we saw ng-click directive in AngularJS,Using functions in AngularJS Controllers, basics of AngularJS Controllers ,ng-hide directive and ng-show directive in AngularJs, ng-disabled directive, ng-repeat directive, ng-init directive and ng-model directive in AngularJS.
In this post I will show you How to Filter data in Angular JS.
So far we have seen the amazing work we can do with AngularJS. In this post I would introduce another amazing feature of AngularJS. In this post I will show you how to filter data in AngularJS. We can do data filtration with much ease in AngularJS. So we will proceed further to see AngularJS in action.
Following is the code that will filter the data. Copy the following code in a HTML page.
< tr ng-repeat = "stud in Students | filter: filtertext" >
var app = angular . module ( “MyAngularApp” , [ ] ) ;
In the preceding example we have student data. In this demo we need to filter the records based on either the StudentName or City. To achieve this we have placed an input control to enter the text. This input would serve as the filtration criteria in the ng-repeat directive. We have also added the reference to bootstrap to give a stylish look to the control and make tabular structure.
Let us browse the application to see if our demo is working.
We can see that records are getting filtered based on the name and the city.
In this post we saw how to filter data in AngularJS. I hope this post is useful to the developers. Happy programming!!