-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reseting input fails #18
Comments
Yeah, so it appears that based on everything else that is going on in this directive that when the internal Work-around, hopefully a temporary work-around (i'll see what I can do to fix this when I have time) is to manually set the view value using
Also, which version of angular are you running and which version of this script are you running? I think this probably only exists in the 1.2.x branch, the 1.3.x branch shouldn't suffer this problem. |
im using 1.2.28 |
I'm using 1.4.1 and running into the same problem. Blanking out both fields still shows error. |
But what version of angular? |
angular 1.3.15 |
Hi friends, this is not a bug, I have written this example to prove it: https://jsfiddle.net/venezuela/wqrxfbrz/ In summary:
Plus: if you have a array $scope.files = [], the angular way to reset a array is using $filter or angular.copy:
Other example: https://jsfiddle.net/venezuela/atpaz7w7/ Also see this stackoverflow questions: |
Hey, just chiming in to let everyone know that I figured out the issue.
This is comparing against user.password. When you go to an empty field in the password field, I just changed mine to compare against the Password Form field instead of the data in scope and then it is comparing an empty string to empty string and then (since Hope this helps some people! |
I have the following html
<input id="passwordConfirm" name="passwordConfirm" type="password" data-ng-model="user.confirmPassword" data-match="user.password" placeholder="{{'password'|i18n}}" class="form-control input-md" required>
in the controller i want to reset the value of the field so
i tried
$scope.user.confirmPassword = ''
and
$scope.user.password = ''
Nothing happens however the expected result would be to the input be cleared
When i remove the data-match directive everything works as expected
The text was updated successfully, but these errors were encountered: