0

I want to implement filtering in angularJs.I searched from googling but not found any ways in which i want.

when controller is load i get data from my web service call. Now i have 3 dropdowns like Status,Company,Area. Now , i want to do that if i select any status from dropdown the table data which is bind on load will filter based on that status and same as other two dropdowns.

So, how can i achieve this.

1 Answer 1

0

Try

ng-repeat="x in list | filter:{status:selectedStatus, company:selectedCompany}"

Where selectedStatus and seletedCompany are dropdown ng-model name.

Keep in mind status and company should be a property of all data.

Sign up to request clarification or add additional context in comments.

5 Comments

if there is no record found then when i want to display No data found message
i have my ng-repeat like ng-repeat="accident in current_accident | filter : {IsActive : status, RegionId : user.ClientRegion , ClientName : user.Company} " but No Record Found does not work for me. i used like <div ng-show="!accident.length">There is no Accidents Found.</div>. so, what i am doing wrong in this ?
i have fixed it. but one problem is i used Footable pagination and if i filter the data the pagination is not work. if data found from 5 page and total records found from filter is 5 then total 5 pagination pages display even if total page size is 10.
This ia another problem. Post new question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.