Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

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

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

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

godmar opened this issue Aug 27, 2012 · 2 comments

Comments

@godmar
Copy link
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
Copy link
Contributor

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

@godmar
Copy link
Contributor Author

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
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 angular#1301
IgorMinar added a commit that referenced this issue Aug 30, 2012
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants