JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://code.angularjs.org/1.0.1/angular-1.0.1.min.js"></script>
<!DOCTYPE html>
<html ng-app>
<head>
<title>Search form with AngualrJS</title>
  <script>
function SearchCtrl($scope, $element, $http) {
        $scope.url = 'php/search.php';
        $scope.submit = function() {
            //var dt = $(elem.parent()).serialize();
            console.log($element.serialize());
            $http({
                method: 'POST',
                url: $scope.url,
                data: 'first=hgf&last=ghfgh',
                headers: {'Content-Type': 'application/x-www-form-urlencoded'}
            }).success(function(data, status) {
                $scope.status = status;
                $scope.data = data;
                $scope.result = data; // Show result from server in our <pre></pre> element
                //var elem = angular.element(e.srcElement);
                //alert($(elem.parent()).serialize());
            }).error(function(data, status) {
                $scope.data = data || "Request failed";
                $scope.status = status;
            });
            return false;
        };
}
      
  </script>
</head>
<body>
        <div>
        <form ng-controller="SearchCtrl" ng-submit="submit()">
            <label>Search:</label>
            <input type="text" name="keywords" ng-model="keywords" placeholder="enter name...">
            <input type="text" name="desc" ng-model="desc" placeholder="enter description...">
            <button type="submit">Search</button>
            <p>Try for example: "php" or "angularjs" or "asdfg"</p>
        </form>
<pre ng-model="result">
{{result}}
</pre>
   </div>
</body>

</html>