Confirm dialog box in angularjs
问题 How can I apply confirm dialog box in below button in angularjs ? <button class="btn btn-sm btn-danger" ng-click="removeUser($index)">Delete</button> Just like this. <span><a class="button" onclick="return confirm('Are you sure to delete this record ?')" href="delete/{{ item.id }}">Delete</span> Update Currently I am doing it like this function removeUser(index) { var isConfirmed = confirm("Are you sure to delete this record ?"); if(isConfirmed){ vm.users.splice(index, 1); }else{ return false