title: How to pass the value of checkbox to function using Angular?
body: <p>In my Razor view I am using Angular and trying to pass the value of a checkbox to  function.</p>
  
  <p>When the following input is checked"</p>
  
  <pre><code>&lt;label&gt;&lt;input id="divpriority" ng-model="priority" type="checkbox" /&gt;
    Select all - high priority
  &lt;/label&gt;
  </code></pre>
  
  <p>This input is changed:</p>
  
  <pre><code>&lt;label&gt;&lt;input class="tablePriority" ng-checked="priority" type="checkbox" /&gt;
     High priority
  &lt;/label&gt;
  </code></pre>
  
  <p>Now I am trying to pass the value(true/false) in the above input to a function:</p>
  
  <pre><code>&lt;td&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;button id="enqueuebtn"  type="button" ng-click="Enqueue(priority)" 
            class="btn-primary"&gt;Enqueue&lt;/button&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>This is not working as priority is undefined when I am debugging my JavaScript.</p>
  
  <p>How can I pass the value <code>true</code>/<code>false</code> to function <code>Enqueue</code> when the second input is checked ?</p>
  
  <p>In my JavaScript I have:</p>
  
  <pre><code>$scope.Enqueue = function (isPriority, ) {
      debugger;
  </code></pre>
  
  <p>While debugging idPriority is undefined.</p>