In my controller:
$scope.deleteUser = function(user){
$.ajax({
url: "/users/" + user.id.toString(),
method: "DELETE",
success: function(result){
$scope.users = result["users"];
alertify.success("done");
},
error: function () {
alertify.error("error");
}
});
return false;
};
when I clicked in delete button user successfully removed in the server. In success
function result["users"]
object contains one less users. But in template
%tr{"ng-repeat" => "user in showedUsers | filter: fio_filter"}
row count not lessen. But when I again clicked on delete button row is removed! why this?