Advertisement
Guest User

Untitled

a guest
Nov 19th, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   $scope.Delete = function (){
  2.       $http({
  3.           method: 'POST',
  4.           url: 'http://api.espaciosvirtuales.info/public/index.php/read_userCredentials',
  5.           data: {
  6.                   email : $scope.email,
  7.                   password : $scope.password,
  8.                 }
  9.           }).then(function successCallback(response) {
  10.             // this callback will be called asynchronously
  11.             // when the response is available
  12.             console.log("Éxito");
  13.             console.log(response)
  14.             $ionicLoading.show({
  15.               template: '<ion-spinner></ion-spinner>'
  16.             });
  17.             $timeout(function() {
  18.               $ionicLoading.hide();
  19.               $state.go('welcome');
  20.             }, 2000);
  21.           }, function errorCallback(response) {
  22.             // called asynchronously if an error occurs
  23.             // or server returns response with an error status.
  24.             console.log("Error");
  25.             console.log(response);
  26.             response.data = Object.values(response.data).toString();
  27.             $scope.showPopupError();
  28.         });
  29.  
  30.     }// END OF DELETE FUNCTION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement