title: how to get selected button value into the input text box to bind values angularjs
body: <p>How to get selected button values into text box ? if i change text in input box, have to bind that text to the button value .. i have a code solved with jquery, but how to solve this with angularjs?? 
  <a href="https://jsbin.com/nesoruwofu/edit?html,js,output" rel="nofollow">JSBin Link to Edit</a></p>
  
  <p><strong>AngularJS</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var app = angular.module('myapp', []);
  
  app.controller('MainCtrl', function($scope) {
  //Code goes here//
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="myapp"&gt;
  
    &lt;head&gt;
      &lt;script src="https://code.angularjs.org/1.4.8/angular.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  
    &lt;body ng-controller="MainCtrl"&gt;
  
  &lt;div&gt;
    &lt;button&gt;Feed&lt;/button&gt;
    &lt;button&gt;the&lt;/button&gt;
    &lt;button&gt;Input&lt;/button&gt;
  &lt;/div&gt;
  &lt;input type="text" value="click a button"&gt;
   
    &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>Solved with jQuery</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var actualButton;
  $( "button" ).click(function() {
    actualButton = $(this);
    var text = $( this ).text();
    $( "input" ).val( text );
  });
  $("input").on('keyup', function(e){
    if(actualButton === undefined)
      return;
  
    actualButton.text($(this).val());
  });</code></pre>
  </div>
  </div>
  </p>