title: How to get the value from text box on button click angular js
body: <pre><code>  &lt;form class="form-group has-success has-feedback" novalidate&gt;
                  &lt;br/&gt;
                  &lt;label class="control-label" for="inputSuccess2"&gt;Enter the Phone Number&lt;/label&gt;
                  &lt;input type="number" class="form-control" ng-model="user.phonenum" name="phonenum" id="inputSuccess2"&gt;
  
                  &lt;button ng-click="myData.doClick(item, $event)" class="btn btn-primary"&gt;Get Mobile Phone Number Data&lt;/button&gt;
              &lt;/form&gt;
  
              &lt;br/&gt;
              Data from server: {{myData.fromServer.State}}
  
  
        &lt;script&gt;
          angular.module("myapp", [])
                  .controller("MyController", function($scope, $http) {
                      $scope.myData = {};
                      $scope.myData.doClick = function(item, event) {
  
                          var responsePromise = $http.get("https://ajith-indian-mob-info.p.mashape.com/getInfo?mobno="+item, {headers: {'X-Mashape-Key': ''}});
                          responsePromise.success(function(data, status, headers, config) {
                              $scope.myData.fromServer = data;
                          });
                          responsePromise.error(function(data, status, headers, config) {
                              alert("AJAX failed!");
                          });
                      }
  
  
                  });
      &lt;/script&gt;
  </code></pre>
  
  <p>Hi i am new to angular how do i get the value from textbox into the controller angular?</p>