-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Library does not play well with Angular 1.6 ngModelOptions #6360
Comments
@wesleycho - can you provide a concrete reproduction of the problem? Then I will try to help find a solution. |
There are two potential issues here that I'm not sure how to address. The first one is that The other situation deals with the inheritance aspect of the new The solution for both these situations will likely be the same, but I'm a bit mystified as to what is a good way around this that handles Angular 1.5 & 1.6 amicably. |
Is the problem that in 1.6 there is always a If what you want to do is know whether someone has actually put a real Would that help? |
Hm, I guess that'd work - guess I got some refactoring to do... Thanks for the advice! |
@wesleycho - I believe that the new inheritance of Even before 1.6 it was always the case that a |
Ah, so basically it will only be a problem that |
The problem for you, I believe, is that |
Right, that was my main worry with 1.6. |
Also, from running the tests I see that bootstrap is falling foul of the |
Here is the breaking change described, please check: angular/angular.js@296cfce |
@wesleycho since $options is always present but you want the fall back, why not use the createChild part of the API. I encountered this issue and began work on a PR before I came across this issue. I've tried this code and the specs pass. datepicker.js -- init() -- before datepicker.js --init() -- after And a bunch of Outside of that, the most failures are the missing promise rejections. Thus far adding I've only just began this work, so there may be some holes |
Interesting - does createChild create a system for inheritance? |
This is the documentation:
Given that, the order in which Any insight/gotchas that you know of off the top of you head as I familiarize myself with the code would be appreciated. |
The first step I'm taking is to address the promise rejections, but I've hit a bit of a wall and could use some help. (I'm trying to tackle the modal tests right now). In However, there are still some failures due to the way a Jasmine matcher is configured. The method I'm thinking it has to do with the fact that since I am calling Based on that, I think something needs to change in the matcher. How can I determine if a pass/fail has occurred further up a promise chain? That way all the pass/fail logic can be in the successCallback instead of split between it and an errorCallback? |
Given this behavior, I think I am heading in the wrong direction. Updating to Instead, I'm now thinking that it's only the specs that need changing... |
If a parent component is using ngModel with ngModelOptions in Angular 1.6, then the options will leak to the child using ngModelOptions (i.e. could be a datepicker, datepicker popup, or typeahead), and cause it to be set as the default to be used instead of the fallbacks of the binding specified options or the global constant specified options.
Cross-linking issue in Angular here angular/angular.js#15497
The text was updated successfully, but these errors were encountered: