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

feat(ngModelOptions): introduce separate directive for inheriting from parent ngModelOptions #15388

Closed
gkalpak opened this issue Nov 14, 2016 · 1 comment

Comments

@gkalpak
Copy link
Member

gkalpak commented Nov 14, 2016

Do you want to request a feature or report a bug?
Feature.

What is the current behavior?
ngModelOptions inherit properties from ancestor ngModelOptions instances (or the defaults provider). Ths makes it difficult to "isolate" your ngModelOptions, especially in the face of the possibility of adding new options in the future.

What is the expected behavior?
It should be easier and safer to "isolate" an ngModelOptions instance. One possible solution is:

  1. Revert ngModelOptions to the previous, non-inheriting behavior.
  2. Introduce a new directive (e.g. ngExtendModelOptions/ngModelOptionsInherit/...) that inherits from parent instances (i.e. has the 1.6.0-rc.0 behavior).

What is the motivation / use case for changing the behavior?
The behavior introduced in #10922 has several implications for 3rd-party libraries making it difficult for users to ensure compatibility of their 3rd-party dependencies with Angular 1.6+ and for library authors to maintain forwards and backwards compatibility.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.

Affects Angular versions 1.6+.)

Other information (e.g. stacktraces, related issues, suggestions how to fix)
See the discusion in #10922 (comment).

@petebacondarwin
Copy link
Contributor

Fixed by #15389

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

No branches or pull requests

2 participants