how to use filter on button click in angular js

前端 未结 2 578
Happy的楠姐
Happy的楠姐 2021-01-25 08:06

could you please tell me how to sort array in ascending or descending order on button click .Actually I have a button on header \"V\" .using button click I want to display data

2条回答
  •  轮回少年
    2021-01-25 08:39

    if your data is an array then you can use orderBy filter See official doc here : https://docs.angularjs.org/api/ng/filter/orderBy

提交回复
热议问题