我是AngularJS的新手,我需要一些幫助來嘗試刪除按鈕,以刪除AngularJS中的用戶。如果有人能幫助,我會感激的。提前致謝。如何使刪除按鈕在AngularJS中刪除用戶?
這裏是我的刪除按鈕,我創建
<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];
});
}]);
其中是您的用戶的邏輯或細節。請發帖 –
查看更新後的問題請 –
你用ng-repeat來顯示用戶嗎?你在服務器端使用什麼語言? – Akashii