Skip to content

Commit

Permalink
Silme işlemleri
Browse files Browse the repository at this point in the history
Yeni eklenen kaydın id sini geri döndürerek sil düğmesine eklenmesi.
  • Loading branch information
bbilginn committed Feb 28, 2013
1 parent 4db286c commit 1bd909f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
alert(status);
});

$scope.SanatciSil = function (id, index) {
$http.delete("http://localhost:8651/api/values/" + id)
$scope.SanatciSil = function (_id, index) {
$http.delete("http://localhost:8651/api/values/" + _id)
.success(function (data, status, headers, config) {
$scope.Sanatcilar.splice(index, 1);
}).error(function (data, status, headers, config) {
Expand All @@ -21,7 +21,7 @@
if ($scope.Ad.length > 0) {
$http.post("http://localhost:8651/api/values", { Ad: $scope.Ad, Albums: [] })
.success(function (data, status, headers, config) {
$scope.Sanatcilar.push({ Ad: $scope.Ad, Albums: [] });
$scope.Sanatcilar.push({ _id: data.replace('"', "").replace('"', ""), Ad: $scope.Ad, Albums: [] });
FormSifirla();
}).error(function (data, status, headers, config) {
alert(status);
Expand Down

0 comments on commit 1bd909f

Please sign in to comment.