Skip to content

using the ng-model-options directive on a field (Angular 1.3+) prevents the initial value from being displayed #152

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

Merged
merged 5 commits into from
Feb 1, 2016

Conversation

jamesbrobb
Copy link
Contributor

I've modified the example forms to demonstrate this issue.

The first commit shows the expected behaviour when setting an initial value within the django view. As you can see, every form displays 'james' within the first name field.

The second commit shows the broken behaviour once angular 1.3 and ng-model-options are used. As you can see, the initial value 'james' is no longer displayed.

I realise i've already submitted a fix for this (issue #127), but got a bit carried away refactoring my changes. So this is a closer fit to your original logic, using the actual ngModelController to set the value on the model.

@adrienbrunet adrienbrunet merged commit 3fddacf into jrief:master Feb 1, 2016
@adrienbrunet
Copy link
Collaborator

@jrief I tried this, the behavior is still the same today. I went through the commits, the PR is ok. I never used debounce before but some folks could use it. t.It's merged now. Feel free to comment if you think something is wrong about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants