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.
The included bad-dir-like directives should be in their own ng-repeated elements.
What is the motivation / use case for changing the behavior?
This is clearly a bug. The motivation is that it is a pretty severe one.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
This bug appears in all versions of 1.5.x (starting from 1.5.0). It does not occur in any previous versions. Tested in firefox and chrome.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
You can fix it by using template instead of templateUrl. I don't really consider this a fix though.
The text was updated successfully, but these errors were encountered:
This is a known issue. Directives that use transclude: 'element' (such as ngIf, ngInclude, ngRepeat etc) do not work as expected as root nodes of directives with replace: true and templateUrl.
There are ways to work around this, but essentially replace: true is deprecated and bugs such as this are not prioritized (or oftentimes impossible to fix without a major rewrite of the $compile service).
Closing as duplicate of #14326 and #14626. (There are more details on these issues.)
Do you want to request a feature or report a bug?
Report a bug
What is the current behavior?
Assume there is a directive called
badDir
, which is specified as follows:Then, somewhere it is inside an ng-repeat like so:
This will result in all
bad-dir
instances going in the lastng-repeat
'ed div. See the plunker below.Plunker that reproduces:
http://plnkr.co/edit/MyDTWsRbocKW3tScoNRu
What is the expected behavior?
The included
bad-dir
-like directives should be in their ownng-repeat
ed elements.What is the motivation / use case for changing the behavior?
This is clearly a bug. The motivation is that it is a pretty severe one.
Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
This bug appears in all versions of 1.5.x (starting from 1.5.0). It does not occur in any previous versions. Tested in firefox and chrome.
Other information (e.g. stacktraces, related issues, suggestions how to fix)
You can fix it by using
template
instead oftemplateUrl
. I don't really consider this a fix though.The text was updated successfully, but these errors were encountered: