Last active
July 5, 2018 10:58
-
-
Save jquery404/d2789d930f2f5166a8e66a8379df186a to your computer and use it in GitHub Desktop.
Angular HTTP Post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$http({ | |
method: 'POST', | |
url: 'ws/ws_assignment_post.php', | |
data: $.param(reqdata), | |
headers: {'Content-Type': 'application/x-www-form-urlencoded'} | |
}).then(function (response) { | |
var data = response.data; | |
if (data.status === 0) { | |
window.location.href = "/assignments.php"; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment