Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function() {
- app.controller('FormController', function($scope, $http) {
- $scope.user = {
- login:"Darlok",
- password:"2009"
- };
- $scope.processForm = function() {
- console.log($.param($scope.user));
- $http({
- method: 'POST',
- url: 'http://localhost:8080/user/login',
- data: $.param($scope.user),
- headers : {'Content-Type': 'application/x-www-form-urlencoded'}
- })
- .then(function successCallback(response) {
- }, function errorCallback(response) {
- });
- };
- });
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement