Open dcolley opened 7 years ago
Is this a feature or bug?
<form name="testForm" novalidate> <p>$dirty:{{testForm.$dirty}}</p> <p>$pristine:{{testForm.$pristine}}</p> <p>$touched:{{testForm.$touched}}</p> <p> <input type="text" name="param1" ng-model="param1" placeholder="some text"> </p> <p> <input type="text" name="happy" ng-model="happy" placeholder="some text"> </p> <ui-switch name="happy" ng-model="happy"></ui-switch> </form>
You can see ui-switch has been changed to true, but the form is $pristine and not $dirty
true
bower.json
PS: Note, I am NOT loading angular-material in index.html
This is my work-around:
<ui-switch name="happy" ng-model="happy" ng-click="testForm.$dirty=true"></ui-switch>
Is this a feature or bug?
You can see ui-switch has been changed to
true
, but the form is $pristine and not $dirtybower.json
PS: Note, I am NOT loading angular-material in index.html