Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $scope.postForm = function(dataForm){
- $ionicLoading.show({
- template: 'Verifying...'
- });
- var encodedString = 'action=' +
- encodeURIComponent("CheckLogin") +
- '&user=' +
- encodeURIComponent(dataForm.datausername) +
- '&pw=' +
- encodeURIComponent(dataForm.datapassword);
- $scope.errorMsg = ""; //reset the error message
- $http({
- method: 'POST',
- url: 'http://mylocalhost/mysite.aspx',
- data: encodedString,
- headers: {'Content-Type': 'application/x-www-form-urlencoded'}
- })
- .success(function(data, status, headers, config) {
- //some of my codes
- })
- .error(function(data, status, headers, config) {
- $scope.errorMsg = 'Unable to submit form' + status;
- $ionicLoading.hide();
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement