mardi 16 août 2016

Trying to use bootbox in angularjs for delete confirmation

I'm Trying to use the cool bootbox dailog in my angular application but it's not working

i mean when i add the bootbox the page dosen't load

this is what i tried so for

$scope.DeleteAllClick = function() {
  var request = $http({
    method: "post",
    url: "CloudManage.php",
    data: {
      Page: "DeleteAll",
      Did: $routeParams.Did,
      devices: $rootScope.SelectedDeviceInGroup,
      gid: $rootScope.gid,
    },
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }

  });

  request.success(function(data) {
    $scope.response = data;
    var status3 = data.success;
    var status_error = $scope.response.messageError;
    if (status3 == false) {
      $.jGrowl(status_error, {
        header: 'Failed',
        animateOpen: {
          height: 'show'
        }
      });
    } else {
      $.jGrowl(status_error, {
        header: 'Success',
        animateOpen: {
          height: 'show'
        }
      });
    }
  });

  //location.reload();
  $http({
      method: "POST",
      url: "CloudManage.php",
      data: {
        Page: "TableList",
        Did: $routeParams.Did,
        gid: $rootScope.gid
      },
      headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
      }
    })
    .success(function(response) {
      $scope.TableListInfo = response;
    });
}
<button type="button" class="btn btn-deleteall delete-all" data-ng-click="DeleteAllClick()"> <i class="glyphicon glyphicon-trash"> </i> <span>DeleteAll</span></button>


<script src="js/bootbox.min.js"></script>

And i even tried http://ift.tt/2aYZL7X but it is also not working i don't know what i'm missing




Aucun commentaire:

Enregistrer un commentaire