SHOW:
|
|
- or go back to the newest paste.
1 | function LoginCtrl($scope, $http){ | |
2 | $scope.panel = 1; //Panel home a 1 | |
3 | ||
4 | ||
5 | $scope.login = function(){ | |
6 | var LoginRO = { | |
7 | email : $scope.email, | |
8 | password : $scope.password | |
9 | } | |
10 | $scope.loader = true; | |
11 | $.ajax({ | |
12 | type:"POST", | |
13 | - | beforeSend: function (request) |
13 | + | headers: { 'X-ApiKey': 'MasterMarket2014', |
14 | - | { |
14 | + | 'Content-Type': 'application/json;charset=UTF-8' } |
15 | - | request.setRequestHeader("X-ApiKey", "MasterMarket2014"); |
15 | + | |
16 | - | request.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); |
16 | + | |
17 | - | }, |
17 | + | |
18 | alert("Oh ouiiiiiii ! Enfin c'est magnifique ! Bon ce soir on fais la fête yepa youhou ! "); | |
19 | - | dataType: "json", |
19 | + | |
20 | alert("Ma va fancullo ! "); | |
21 | } | |
22 | }); | |
23 | } | |
24 | ||
25 | httpSuccess = function(response){ | |
26 | ||
27 | $scope.panel = 1; | |
28 | $scope.loader = false; | |
29 | alert("Bravo connard !") | |
30 | } | |
31 | ||
32 | httpError = function(){ | |
33 | $scope.loader = false; | |
34 | alert("Et bah non ça marche pas fils"); | |
35 | } | |
36 | } |