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
fix($compile): check clashing directives before compilation #4217
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the PR!
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
This might solve #3307 |
ghost
assigned vojtajina
Oct 10, 2013
I'm taking over this one since vojta is out today. |
ghost
assigned IgorMinar
Oct 10, 2013
This strategy doesn't work for cases when directives are lazily added onto the node from compile functions or via the |
IgorMinar
added a commit
to IgorMinar/angular.js
that referenced
this pull request
Oct 11, 2013
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See angular#4357. Closes angular#3893 Closes angular#4217 Closes angular#3307
I'm closing this PR for now since it's obsolete. |
IgorMinar
added a commit
to IgorMinar/angular.js
that referenced
this pull request
Oct 12, 2013
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See angular#4357. Closes angular#3893 Closes angular#4217 Closes angular#3307
IgorMinar
added a commit
that referenced
this pull request
Oct 12, 2013
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See #4357. Closes #3893 Closes #4217 Closes #3307
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this pull request
Jan 27, 2014
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See angular#4357. Closes angular#3893 Closes angular#4217 Closes angular#3307
jamesdaily
pushed a commit
to jamesdaily/angular.js
that referenced
this pull request
Jan 27, 2014
Issue an error and abort compilation when two directives that ask for transclusion are found on a single element. This configuration is not supported and we previously failed to issue the error because in the case of element transclusion the compilation is re-started and this caused the compilation context to be lost. The ngRepeat directive has been special-cased to bypass this warning because it knows how to handle this scenario internally. This is not an ideal solution to the problem of multiple transclusions per element, we are hoping to have this configuration supported by the compiler in the future. See angular#4357. Closes angular#3893 Closes angular#4217 Closes angular#3307
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clashing directive check was not working correctly when two directives requested
'element'
transclusion because one would start a new compilation (a recursive sub procedure) with any duplicate info being reset.This PR moves the checking to its own loop which is executed before the actual compilation.