title: angularJs on ng-submit serialize form (ajax way)
body: <p>First of all, my back-end is using cakePHP 2.3 so I will like to have ajax way serialize all. </p>
  
  <p>currently i have a form to test if serialize function working</p>
  
  <pre><code>//index
  &lt;http ng-app="app"&gt;...
  &lt;div ng-controller="appCtrl" ng-model='data'&gt;...
  &lt;form ng-submit="helloWorld(this)" onsubmit="event.returnValue = false; return false;"&gt;
  ...&lt;/form&gt;&lt;div&gt;&lt;/http&gt;
  
  //app.js
  var app = angular.module('app', []);
  app.controller("appCtrl", function($scope){
      $scope.helloWorld = function(element){
          console.log(element);
      }
  });
  </code></pre>
  
  <p>however it just return a bunch of item. tried $(element.target).serialize() but it cannot work. Finding an equivalent way of doing data: $(element.target).serialize() .</p>
  
  <p>JsFiddle at <a href="http://jsfiddle.net/eX7fB/" rel="nofollow">http://jsfiddle.net/eX7fB/</a></p>
  
  <p>version 2 for explain <a href="http://jsfiddle.net/eX7fB/1/" rel="nofollow">http://jsfiddle.net/eX7fB/1/</a></p>