-
Notifications
You must be signed in to change notification settings - Fork 27.4k
fix($scope): fixes multiple root element error when there is a whites… #15132
fix($scope): fixes multiple root element error when there is a whites… #15132
Conversation
This issue doesn't only happen with replace directives, but with any directive that has a comment node with whitespace around it. I think these two tests should be added:
for the test |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
32886b1
to
a43d34e
Compare
CLAs look good, thanks! |
1 similar comment
CLAs look good, thanks! |
…pace after a comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 Removing accidental fdescribe
a43d34e
to
f01e07c
Compare
@Narretz Added those tests |
@prashantpawar Sorry, you are right, it's all replace directives. It looks like these tests are duplicated in a few places. |
…d a top-level comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 PR (angular#15132)
…d a top-level comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 PR (angular#15132)
…d a top-level comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 PR (angular#15132)
…d a top-level comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 PR (angular#15132)
…d a top-level comment Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile Added corresponding unit tests. Closes angular#15108 PR (angular#15132)
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix
What is the current behavior? (You can also link to an open issue here)
If one tries to load a directive with a top-level comment angular throws an error
Error: [$compile:tplrt] Template for directive 'myDirective' must have exactly one root element
#15108
Does this PR introduce a breaking change?
No
Please check if the PR fulfills these requirements
Other information:
fixes multiple root element error when there is a whitespace after a comment
Added new conditional for NODE_TYPE_TEXT inside removeComments method of $compile
Added corresponding unit tests.
Closes #15108