SHARE
TWEET

Untitled

mogaj Jul 21st, 2014 203 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $scope.processSubmitEdit = function (isValid) {
  2.                 if(isValid) {
  3.                     $http({
  4.                         method  : 'PUT',
  5.                         url     : '/vehicles-manufacturers',
  6.                         data    : $.param($scope.manf),  // pass in data as strings
  7.                         headers : { 'Content-Type': 'application/x-www-form-urlencoded' }  // set the headers so angular passing info as form data (not request payload)
  8.                     })
  9.                         .success(function(data) {
  10.                             if (data.status == true) {
  11.                                 $location.path("/vehicles-manufacturers");
  12.                             } else {
  13.                                 $scope.messages = data.msg;
  14.                             }
  15.                         });
  16.                 } else {
  17.                     $scope.messages = 'Form invalid';
  18.                 }
  19.             };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top