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

IE 8 unknown runtime error when setting directive template #3050

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

IE 8 unknown runtime error when setting directive template #3050

inuwan opened this issue Jun 25, 2013 · 3 comments

Comments

@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
Copy link
Author

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

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

@Narretz
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants