title: Restangular POST form data in json format in Angular JS
body: <p>I am new to Angular JS and I am in  a need to use restangular POST of form data in json format. Also I am new to the POST functionalities, can anyone tell me how I can do it??</p>
  
  <p><strong>MY Index Page:</strong></p>
  
  <pre><code>&lt;form ng-controller="registerCtrl"&gt;
   &lt;input placeholder="Username" type="email" name="username"  ng-model="user.email" /&gt;
   &lt;input placeholder="Password" type="password" name="password" ng-model="user.password"/&gt;
   &lt;input placeholder="Confirm Password" type="password" name="confirmpassword"  ng-model="user.confirmPassword" /&gt;
   &lt;button class="btn btn-info" ng-click="registerUser()" type="submit"&gt;Login&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>var myApp=angular.module('myApp',['restangular']);
  function registerCtrl($scope, Restangular){
  $scope.user = {};
  $scope.registerUser=function(){
          $scope.people = Restangular.all('data.json/:user').post($scope.user);
      }
  }
  </code></pre>
  
  <p>Here where should I pass the input values as the Json format..... If am wrong with the code, pls correct me.....</p>