You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
fix($compile): ensure element transclusion directives are linked with comment element
This corrects a complicated compiler issue, described in detail below:
Previously, if an element transclusion directive contained an asynchronous directive whose template
contained another element transclusion directive, the inner element transclusion directive would be
linked with the element, rather than the expected comment node.
An example manifestation of this bug would look like so:
```html
<div ng-repeat="i in [1,2,3,4,5]">
<div my-directive>
</div>
</div>
```
`my-directive` would be a replace directive, and its template would contain another element
transclusion directive, like so:
```html
<div ng-if="true">{{i}}</div>
```
ngIf would be linked with this template content, rather than the comment node, and the template element
would be attached to the DOM, rather than the comment. As a result, this caused ng-if to duplicate the
template when its expression evaluated to true.
Closes#6006Closes#6101
0 commit comments