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