You’ll have to find the index of the person
in your persons
array, then use the array’s splice
method:
$scope.persons.splice( $scope.persons.indexOf(person), 1 );
You’ll have to find the index of the person
in your persons
array, then use the array’s splice
method:
$scope.persons.splice( $scope.persons.indexOf(person), 1 );