Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

form-level ngModelOptions #7212

Closed
JeroMiya opened this issue Apr 23, 2014 · 2 comments
Closed

form-level ngModelOptions #7212

JeroMiya opened this issue Apr 23, 2014 · 2 comments

Comments

@JeroMiya
Copy link

ngModelOptions is a great feature, but I'd love to be use ngModelOptions on a form element, and have those options inherited by default for each field of the form. I often have a set of fields in a form that should all have the same ngModelOptions, but in the current implementation I have to specify ngModelOptions for each field individually. If one were to specify ngModelOptions at the form level, I could avoid repeating myself. It should still be possible to override those form-level options by specifying ngModelOptions for a particular field.

Also, perhaps a service or provider should allow the default ngModelOptions values to be specified globally? So the option inheritance would would be: global options -> form options -> field options.

@shahata
Copy link
Contributor

shahata commented Apr 23, 2014

ngModelOptions are already inherited just as you describe. I agree that the inheritance feature is not documented properly.

@petebacondarwin
Copy link
Contributor

Anyone fancy improving the documentation for that?

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

No branches or pull requests

3 participants