-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngTransclude breaks directive execution when priority is set to -1 or lower #16411
Comments
ngTransclude
breaks directive execution when priority is set to -1
or lower
Strange! I can't tell from the commit why terminal: true was included. No tests failed when I removed it. Maybe to prevent memory leaks? Idk. Maybe it was needed in this PR, but then made obsolete in the follow-up PR: #14787 @dcherman and @petebacondarwin can you take a look at this, since you made these changes? |
@Narretz Based on my original PR and memory from a while ago, In the followup PR, the contents are being detached in the While |
@dcherman thanks for the quick response - this must be the case. I confirmed that your implementation only works with terminal: true, but the new implementation doesn't need it. I'll prepare a PR to remove it from ngTransclude. |
@Narretz I noticed this was added to the Ice Box milestone, although this issue has a major impact on our app after upgrading to 1.5.11. We can downgrade to 1.5.7, but I really would like to avoid that. What are the chances of this making this into a patch in the next 7 days? |
This was introduced in commit 2adaff0, but made obsolete in 41f3269. Fixes angular#16411
It was added to Icebox because I didn't know if it was easy to fix. But there's already a PR: #16412 |
This was introduced in commit 2adaff0, but made obsolete in 41f3269. Fixes angular#16411
This was introduced in commit 2adaff0, but made obsolete in 41f3269. Fixes angular#16411 Closes angular#16412
I'm submitting a ...
Current behavior:
As of angularjs 1.5.8, directives that transclude other directives (for example a
requireAuth
directive to block any events unless the user is authenticated) that have apriority
of less than0
will not fire.Expected / new behavior:
Directives with a
priority: -1
should ALWAYS fire beforepriority: 0
directives.Minimal reproduction of the problem with instructions:
https://codepen.io/dknell/pen/dJjvVy
AngularJS version: 1.x.y
1.5.8
Browser: [all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
Anything else:
This bug was introduced when
terminal: true
was added tongTransclude
here. Why would we wantngTransclude
to block all execution of transcluded directives? This was not the case with versions 1.5.7 and below. There is no mention in the PR for why this was added.The text was updated successfully, but these errors were encountered: