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

IE 8 unknown runtime error when setting directive template #3050

Closed
inuwan opened this Issue Jun 25, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@inuwan
Copy link

inuwan commented Jun 25, 2013

This only happens on IE 8 (works fine in IE 9, IE 10, Firefox, Chrome, Safari). The JQLite code of angular.js is throwing an "unknown runtime error" in the html() method on the line: (line 1976 in angular.js 1.1.5)

 element.innerHTML = value

The value is the html string for the template of a directive. In the debugger, I tried:

  element.innerHTML = "hello"

which also threw an "unknown runtime error"

The nodeName for the element is the name of my directive XX-MYDIRECTIVE

I'm manually calling the angular bootstrap method on the html page, which has a directive element. Here is the call stack:
compileNodes [angular.js] Line 4502 Script
compile [angular.js] Line 4437 Script
Anonymous function [angular.js] Line 1006 Script
$eval [angular.js] Line 8926 Script
$apply [angular.js] Line 9006 Script
Anonymous function [angular.js] Line 1004 Script
invoke [angular.js] Line 2925 Script
resumeBootstrapInternal [angular.js] Line 1002 Script
bootstrap [angular.js] Line 1017 Script

@inuwan

This comment has been minimized.

Copy link

inuwan commented Jun 25, 2013

I found the workaround to the issue. If you change the directive from an element to an attribute, a runtime error will not be thrown. It seems that IE 8 does not like custom tag names such as and will throw a "unknown runtime error" when you attempt to set the innerHTML of a custom tag.

@emhagman

This comment has been minimized.

Copy link
Contributor

emhagman commented Jun 26, 2013

I believe I have fixed the issue here, please give it a try!
#3069

@Narretz

This comment has been minimized.

Copy link
Contributor

Narretz commented Jun 24, 2014

Hi, I am going to close this issue. Please see #3069 for the reasons (basically, the effort to support custom tags in IE8 is not worth it)

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