-
Notifications
You must be signed in to change notification settings - Fork 27.5k
not parsing expressions in attributes, select with ng-options Angular 1.2.0.rc3 #4511
Comments
I noticed the same thing with select & id attribute. |
It seems to be related to 31f190d, but not sure what's the best way to get around it. |
previously the compile/link fns executed in this order controlled via priority: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityHigh, PostLinkPriorityMedium, PostLinkPriorityLow This was changed to: - CompilePriorityHigh, CompilePriorityMedium, CompilePriorityLow - PreLinkPriorityHigh, PreLinkPriorityMedium, PreLinkPriorityLow - link children - PostLinkPriorityLow, PostLinkPriorityMedium , PostLinkPriorityHigh Using this order the child transclusion directive that gets replaced onto the current element get executed correctly (see issue #3558), and more generally, the order of execution of post linking function makes more sense. The incorrect order was an oversight that has gone unnoticed for many suns and moons. (FYI: postLink functions are the default linking functions) BREAKING CHANGE: the order of postLink fn is now mirror opposite of the order in which corresponding preLinking and compile functions execute. Very few directives in practice rely on order of postLinking function (unlike on the order of compile functions), so in the rare case of this change affecting an existing directive, it might be necessary to convert it to a preLinking function or give it negative priority (look at the diff of this commit to see how an internal attribute interpolation directive was adjusted). Closes #3558
Here are some results of what I have found : Suppose that "directive" is our own directive which access attribute that needs to be interpolated. Here is a sample HTML :
We have 4 declared directives : select, ngModel, ngOptions, directive1. Directives are loaded from highest priority to lower. In RC2 :
directives contains those 5 objects :
In RC3 :
directives contains those 5 objects :
The interpolation directive has its priority changed from 100 (in RC2) to -100 (in RC3). The terminal property does not mean that the directive is the final one, it means that its priority will be the lowest possible one for the current element.
As the ngOptions directive is terminal, the lowest priority possible is set to 0. |
so.. select directive priority should be -101.. :) |
Test your jsfiddle (it's already using the latest snapshot). It works now :) Gotta thank 79223ea |
Yeah, noticed it too, nice to see the problem is not forgotten :) |
Closed the issue as it's working in 1.2 release. |
Hi guys,
I had a few dropdows that were working fine in my project until rc2, but rc3 broke them.
Some dynamic attributes I have are not being parsed at all, like for example, id="something{{$index}}; the same attributes in other input types or dropdowns without ng-options are parsed just fine.
Here's a fiddle exemplifying the problem: http://jsfiddle.net/S6vz7/1/, you can notice the difference when you hover selects or inputs.
Regards,
Ygor
The text was updated successfully, but these errors were encountered: