-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Interpolated values aren't reflected when using templateUrl #836
Comments
Misko can you have a look at this. you can repro the issue here: http://jsfiddle.net/CHVbb/367/ |
I have wasted 30 minutes on this issue, and still have no clue what is it you think does not work PLEASE!!!!
|
I was in a bit of a hurry for the last fiddle, took some time and cleaned it up to be more direct, this should be much easier to see what the actual problem is, which is when using templateUrl in a directive, observing the bound attributes from within the link method doesn't seem to be working. Switching to use an inline template though, and it does work. Here's the fiddle, preset to show the problem, but also with a commented out template so you can see the difference: |
I've reproduced the problem in this fiddle: http://jsfiddle.net/bQSQt/5/ Inside an ng-repeat, a directive using templateUrl will fail to interpolate attributes values when rendering the template. Edit: updated fiddle to template and templateUrl contents match |
This appears to be a similar problem... The @ scoped values are not being interpolated if using templateUrl. Fiddle showing the broken behavior: http://jsfiddle.net/Kpd89/ |
This fixes the issue that caused two attr interpolation observers to be registered for the same attribute as a result of isolate scope definition with attr (@) property for this attribute. Duplicate observers would then fight with each other updating the model. The issue occured only when this directive was used in a repeater because that's when we clone the template node which caused the two observers to point to two different sets of $attr instances. Closes angular#1166, angular#836
This fixes the issue that caused two attr interpolation observers to be registered for the same attribute as a result of isolate scope definition with attr (@) property for this attribute. Duplicate observers would then fight with each other updating the model. The issue occured only when this directive was used in a repeater because that's when we clone the template node which caused the two observers to point to two different sets of $attr instances. Closes #1166, #836
This fixes the issue that caused two attr interpolation observers to be registered for the same attribute as a result of isolate scope definition with attr (@) property for this attribute. Duplicate observers would then fight with each other updating the model. The issue occured only when this directive was used in a repeater because that's when we clone the template node which caused the two observers to point to two different sets of $attr instances. Closes #1166, #836
Fixed in 1.0.3, yuppi :-) |
In the following fiddle, when using templateUrl, {{authorized}} isn't being reflected properly, but switching to an inline template it is reflected properly. Workaround is here, provided by votja: http://jsfiddle.net/vojtajina/CHVbb/302/
The text was updated successfully, but these errors were encountered: