title: how to pass value in angular js in jsp/servlet
body: <p>I am developing a module in jsp/servlet in which i need to use angular js.
  how could i pass the value from input box value in function then 
  how to send value in servlet also...!</p>
  
  <p>Here the example of code:-</p>
  
  <pre><code> &lt;%@page contentType="text/html" pageEncoding="UTF-8"%&gt;
    &lt;!DOCTYPE html&gt;
    &lt;html ng-app="mehandi" &gt;
    &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;JSP Page&lt;/title&gt;
  
  
        &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"&gt;  
       &lt;/script&gt;
       &lt;script&gt;
          var app = angular.module('mehandi', []);
          app.controller('mhndiCtrl', function($http){
              var xyz = this;
              xyz.data = {}
              xyz.swati = function($http){
  
  
              }
  
          })
  
  
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body ng-controller="mhndiCtrl as abc" &gt;
      &lt;h1&gt;Hello World!&lt;/h1&gt;
      &lt;input type="text" ng-model="abc.data.myname"&gt;
      {{abc.data}}
      &lt;button ng-click="abc.swati()" &gt; &lt;/button&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>