title: angularjs get form action and submit to it
body: <p>I have a form and I want to catch it submission, check validation of data and than submit form to the action inside the HTML form.</p>
  
  <pre><code>&lt;div ng-controller="contactCtrl"&gt;
     &lt;form action="someAction" method="post" name="contactForm" class="clearfix frmContact"&gt;
        &lt;div class="one_half"&gt;
           &lt;input id="txtName" ng-model="name" value="" class="form-control"&gt;
        &lt;/div&gt;
        &lt;button ng_click="save($event)" type="submit"&gt;Send Message&lt;/button&gt;
     &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and my js:</p>
  
  <pre><code>var app = angular.module('bloompyApp', []);
  
  app.controller("contactCtrl", function($scope, $http) {
      $scope.email = "";
      $scope.name = "";
      $scope.message = "";
      $scope.left  = function() {return 100 - $scope.message.length;};
      $scope.clear = function() {$scope.message = "";};
      $scope.save  = function(ev) {
          ev.preventDefault();
          console.log(angular.element(document.querySelector('body')));
  
          if ($scope.contactForm.$valid) {
              $http.get("/posts/")
                  .success(function(response) {console.log(response);});
          }
  
  
      };
  });
  </code></pre>