New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular cannot load inlined templates when run in XHTML documents #1301

Closed
godmar opened this Issue Aug 27, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@godmar
Contributor

godmar commented Aug 27, 2012

When in an XHTML document, all markup is removed from inlined templates.

See http://plnkr.co/edit/3hRDtK?p=preview

Reason: you use 'script.text' instead of 'script.innerHTML' to extract the template body.

@IgorMinar

This comment has been minimized.

Show comment
Hide comment
@IgorMinar

IgorMinar Aug 27, 2012

Member

I wonder if IE forced us to use innerHTML. we should check on IE that script.text works fine.

Member

IgorMinar commented Aug 27, 2012

I wonder if IE forced us to use innerHTML. we should check on IE that script.text works fine.

@godmar

This comment has been minimized.

Show comment
Hide comment
@godmar

godmar Aug 28, 2012

Contributor

Maybe I wasn't clear. In 1.0.1 you do use script.text, but this fails for XHTML. You could use innerHTML for XHTML and get the full content (at least on Google Chrome).

I'll leave it to you to test IE.

Contributor

godmar commented Aug 28, 2012

Maybe I wasn't clear. In 1.0.1 you do use script.text, but this fails for XHTML. You could use innerHTML for XHTML and get the full content (at least on Google Chrome).

I'll leave it to you to test IE.

IgorMinar added a commit to IgorMinar/angular.js that referenced this issue Aug 30, 2012

fix(jqLite): better support for xhtml
it turns out that some stuff doesn't work in xhtml as it does in html.

for example   can't be innerHTML-ed and auto-closing of elements
doesn't work.

the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.

I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.

Closes #1301

@IgorMinar IgorMinar closed this in bb9bade Aug 30, 2012

IgorMinar added a commit that referenced this issue Aug 30, 2012

fix(jqLite): better support for xhtml
it turns out that some stuff doesn't work in xhtml as it does in html.

for example   can't be innerHTML-ed and auto-closing of elements
doesn't work.

the reporter of the referenced issue claimed that innerHTML vs text on
script made a difference but that doesn't appear to be true in my testing.

I'm not including test for this because testacular doesn't currently
run tests in xhtml yet.

Closes #1301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment