Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoginCtrl($scope, $http){
- $scope.panel = 1; //Panel home a 1
- $scope.login = function(){
- var LoginRO = {
- email : $scope.email,
- password : $scope.password
- }
- $scope.loader = true;
- $.ajax({
- type:'POST',
- contentType:'application/json;charset=UTF-8',
- dataType:'json',
- headers: { 'X-ApiKey': 'MasterMarket2014'}
- url: 'http://82.245.28.34:8080/api/login',
- data: JSON.stringify(LoginRO),
- success: function() {
- alert("Oh ouiiiiiii ! Enfin c'est magnifique ! Bon ce soir on fais la fête yepa youhou ! ");
- }, error: function(){
- alert("Ma va fancullo ! ");
- }
- });
- }
- httpSuccess = function(response){
- $scope.panel = 1;
- $scope.loader = false;
- alert("Bravo connard !")
- }
- httpError = function(){
- $scope.loader = false;
- alert("Et bah non ça marche pas fils");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement