Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Fixed reset bug#6

Open
JBriggs666 wants to merge 1 commit intoTrustroots:masterfrom
JBriggs666:resetFormBug
Open

Fixed reset bug#6
JBriggs666 wants to merge 1 commit intoTrustroots:masterfrom
JBriggs666:resetFormBug

Conversation

@JBriggs666
Copy link

When resetting a form with a trTrustpass input by resetting model, using a function like:

var defaultModel = {
  password : ''
};

vm.reset = function () {
  myModel = angular.copy(defaultModel);
  $scope.form.$setPristine();
  $scope.form.$setUntouched();
};

then the form becomes pristine but the input remains dirty, and if model is reset to an empty string, the input does not update to it's original state. This is now fixed.

… set pristine, and if model is reset to an empty string, passport field is updated
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant