How to remove an item from an array in AngularJS scope?

后端 未结 10 1763
梦毁少年i
梦毁少年i 2020-11-27 09:10

Simple to-do list, but with a delete button on list page for each item:

Relevant template HTML:


          


        
10条回答
  •  孤街浪徒
    2020-11-27 09:35

    You can also use this

    $scope.persons = $filter('filter')($scope.persons , { id: ('!' + person.id) });
    

提交回复
热议问题