I need to be able to programmatically set a checkbox to unchecked when an event happens (the event is actually a modal being hidden). I need to keep the current ng-change
function with the same parametes.
I have a checkbox element:
<input type="checkbox" ng-change="change(ordered, $index, {{part.id}}, {{part.vehicle_id}}, '{{part.ordered_from}}')" ng-true-value="1" ng-false-value="0" ng-model="ordered" name="part-ordered" />
And my JS:
$scope.change = function(value, part_index, id, vehicle_id, ordered_from_val) {
if (modal_hidden_event) {
// UNCHECK CODE.
}
}
I am not too sure what to search for or what area of the docs will help me.