Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function PostCtrl($scope, $http) {
- var method = 'POST';
- var url = 'http://www.lunchbuddy.co/lunchbuddy/profile_login.php';
- $scope.codeStatus = "";
- $scope.add = function() {
- var FormData = {
- 'email' : document.f1.email.value,
- 'password' : document.f1.password.value
- };
- $http({
- method: method,
- url: url,
- data: FormData
- }).
- success(function(response) {
- $scope.codeStatus = response;
- }).
- error(function(response) {
- $scope.codeStatus = response || "Request failed";
- });
- return false;
- };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement