Guest User

Untitled

a guest
Jan 11th, 2018
595
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. $http({
  2. method: 'POST',
  3. data: 'Username=' + $scope.user.email + '&Password=' + $scope.user.password + '&is_varified='+$scope.user.is_varified+'&gcm_reg_id='+gcm_reg_id,
  4. headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  5. url: myService.ajax_base_url+'/login/validate_mobile_user'
  6. }).success(function(data, status, headers, config) {
  7. //console.log(data);
  8. alert('in success');
  9. if (data.is_valid && data.role_id == '5'){
  10.  
  11. modal.hide();
  12. }).
  13. error(function(data, status, headers, config) {
  14. modal.hide();
  15. alert('in error');
  16. while login.');
  17. });
  18.  
  19. $http.post('/someUrl', data, config).then(successCallback, errorCallback);
Add Comment
Please, Sign In to add comment