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

Is there a reason you avoid using ngModel.$setViewValue()? #1036

Closed
mpolichette opened this issue Oct 1, 2015 · 3 comments
Closed

Is there a reason you avoid using ngModel.$setViewValue()? #1036

mpolichette opened this issue Oct 1, 2015 · 3 comments

Comments

@mpolichette
Copy link

On line https://github.com/danialfarid/ng-file-upload/blob/master/src/model.js#L37 you re-parse the ngModel var name off the dom and use .assign to update the model value.

This prevents users from adding their own ng-model validators and using ng-model-controller to control how the model is updated.

It also has the effect of preventing the use of this directive in a component directive which inherits it's ngModel via replacement, if that directive has an isolate scope...

@mpolichette
Copy link
Author

This has also required you to write your own ngf-valid-only instead of using the feature from ng-model-options

@mpolichette
Copy link
Author

You're the man! Thanks for the fast turn around!

@danialfarid
Copy link
Owner

Since version 9.0.3 you can use ngf-model-options and by default invalid files are not allowed.

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

No branches or pull requests

2 participants