Skip to content
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

ng-input hold $viewValue instead of $modelValue #1858

Merged
merged 1 commit into from Dec 8, 2014
Merged

Conversation

@viniciusffj
Copy link

viniciusffj commented Oct 17, 2014

I had some trouble using ng-input for resetting to old value when user press ESC.

I found out that ng-input was storing the initial $modelValue and calling $setViewValue with it when user pressed ESC. This was causing trouble with my input validation, since my view value is different from my model value.

So I changed the ng-input to store the $viewValue instead of $modelValue.

Hope it helps.

…cause the viewValue is set when user press ESC
@PaulL1 PaulL1 added this to the 2.x.next milestone Oct 17, 2014
c0bra added a commit that referenced this pull request Dec 8, 2014
ng-input hold $viewValue instead of $modelValue
@c0bra c0bra merged commit 18ea95d into angular-ui:2.x Dec 8, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.