title: how to pass the value of a button to angular js
body: <p>I wanted to pass my button value to angular js through a function. I tried passing the function with the ng-model but it's not working in the case of a button. So can anyone help me with this thanks in advance</p>
  
  <p>html:</p>
  
  <pre><code>&lt;p align="center"&gt;
      &lt;a href="#category1" id="select1" ng-model="select1" data-transition="slidedown" class="ui-btn ui-corner-all" value="Category 1" ng-click="catFn1()"&gt;Category 1&lt;/a&gt;
  &lt;/p&gt;
  </code></pre>
  
  <p>angular js:</p>
  
  <pre><code>$scope.catFn1 = function () {
      var sel1 = document.getElementById('select1').innerHTML;
      alert(sel1);
      sharedService.prepForBroadcast(sel1); //----- making the button value available through out the code
      return dict1(sel1);
  }
  
  function dict1(sel1) {
      alert(sel1);
      $("#dictation1").click(function () {
          window.location = "#pageeight";
      });
  }
  </code></pre>
  
  <p>I actually wanted to perform controller communication using factory method I just know to communicate by this method. So I need to pass my value through a function.All the answers are valued. </p>