In my AngularJS 1.6 app, I have a component that dynamically generates checkboxes using ng-repeat
. Here is an example:
<div ng-repeat="subItem in item.ChildItemTypes">
<md-checkbox class="md-primary" ng-model="subItem.checked">{{ subItem.Description }}</md-checkbox>
</div>
Since this component is meant to be placed within a form, it does not include a <form>
element.
My question is: How can I access the $dirty
property of these checkboxes within the controller of the component, given that I don't have a reference to the form?