This repository was 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.4k
fix($compile) support templates with select content root nodes #6941
Closed
aeharding
wants to merge
1
commit into
angular:master
from
aeharding:fix-option-element-as-root-template
Closed
fix($compile) support templates with select content root nodes #6941
aeharding
wants to merge
1
commit into
angular:master
from
aeharding:fix-option-element-as-root-template
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! Please check the items below to help us merge this faster. See the contributing docs for more information.
If you need to make changes to your pull request, you can update the commit with Thanks again for your help! |
the compiler will wrap it with a <select> tag. This satisfies IE9. Closes angular#6926
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
I've got an alternative fix for this, it's going to fail jshint for a moment until I fix that. I'll add your tests that you've added to it as well, in a separate commit, those are nice. I think this fix might be preferable, because the hackish stuff in $compile is really... well, it's hackish. Simplifying it in jqLite makes a lot of sense. |
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
I'm closing this given the awesome work done in #6962 😄 |
caitp
added a commit
to caitp/angular.js
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes angular#6941 Closes angular#6926
caitp
added a commit
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes #6941 Closes #6958
caitp
added a commit
that referenced
this pull request
Apr 2, 2014
Previously, the jqLite constructor was limited and would be unable to circumvent many of the HTML5 spec's "allowed content" policies for various nodes. This led to complicated and gross hacks around this in the HTML compiler. This change refactors these hacks by simplifying them, and placing them in jqLite rather than in $compile, in order to better support these things, and simplify code. While the new jqLite constructor is still not even close to as robust as jQuery, it should be more than suitable enough for the needs of the framework, while adding minimal code. Closes #6941 Closes #6958
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.
Request Type: bug
How to reproduce: Create a directive with the following template:
In IE9, it will throw an error complaining about more than one node in the template.
Component(s): $compile
Impact: small
Complexity: small
This issue is related to:
Detailed Description:
Other Comments:
If the first element in a template is an or tag,
the compiler will wrap it with a tag. This satisfies IE9. Closes #6926