This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
directive template vs. templateUrl #1166
Comments
Adding another example http://plunker.no.de/edit/ubOEqt?live=preview |
IgorMinar
added a commit
to IgorMinar/angular.js
that referenced
this issue
Oct 25, 2012
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
IgorMinar
added a commit
that referenced
this issue
Oct 30, 2012
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 was referenced Nov 15, 2012
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have an example with 2 directives defined. One of them has an anchor, when clicked, inserts the other directive as DOM elements onto the page.
http://jsfiddle.net/realdope/cvzWJ/13
In the above code, "elem" is the element to be inserted into the page. Initially both elements are placed on the page to show that they initially render properly.
When I define "template" instead of "templateUrl" in the "elem" directive definition, everything works perfectly. However, when I use a templateUrl with <script type="text/ng-template">, initial rendering works fine, but event-initiated rendering does not work.
The problem is better demonstrated by using a .html file.
The text was updated successfully, but these errors were encountered: