Guest User

Untitled

a guest
Apr 3rd, 2013
159
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function PostCtrl($scope, $http) {
  2. var method = 'POST';
  3. var url = 'http://www.lunchbuddy.co/lunchbuddy/profile_login.php';
  4. $scope.codeStatus = "";
  5. $scope.add = function() {
  6. var FormData = {
  7. 'email' : document.f1.email.value,
  8. 'password' : document.f1.password.value
  9. };
  10. $http({
  11. method: method,
  12. url: url,
  13. data: FormData
  14. }).
  15. success(function(response) {
  16. $scope.codeStatus = response;
  17. }).
  18. error(function(response) {
  19. $scope.codeStatus = response || "Request failed";
  20. });
  21. return false;
  22. };
  23. }
RAW Paste Data