Skip to content

ui-switch does not make form.$dirty or form.$pristine #423

@dcolley

Description

@dcolley

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>

image

You can see ui-switch has been changed to true, but the form is $pristine and not $dirty

bower.json

image
PS: Note, I am NOT loading angular-material in index.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions