I am new to AngularJS, and I need some help of trying to make the delete button, to delete a user in AngularJS. If anyone can help, I will be thankful. Thanks in advance.
Here is my delete button I have created
<button type="button"
class="delete"
ng-click=""
ng-show="!inactive">Delete</button>
//The user view
<div class="people-view">
<h2 class="name">{{people.first}}</h2>
<h2 class="name">{{people.last}}</h2>
<span class="title">{{people.title}}</span>
<span class="date">{{people.date}} </span>
</div>
//Controller
app.controller('MainController',['$scope', 'people', '$routeParams',
function($scope, people, $routeParams) {
people.success(function(data) {
$scope.people = data[$routeParams.id];
});
}]);