Open gschumm opened 11 years ago
What's your use case?
I want to use angular.js in a project for a web portal (Microsoft SharePoint). The requirement is to use the default UI components whenever possible. The native UI provides an API for opening modal dialog windows with an HTML element as content. Content is rendered in an iframe by the system. I want to expand the angular app of the parent page also to the modal window.
When adding angular elements to other frames or windows dynamically using $compile service a HierarchyRequestError is thrown in Internet Explorer.
Here is a simple example that demonstrates the issue: http://plnkr.co/edit/47PFR8bJ7H58yHBmaX5S?p=preview
The problem is, that $compile, jqLite and built-in directives like ngInclude always create DOM elements (from HTML strings) in the document of the page where angular is loaded and not the document the nodes were added to. Some browsers, like Internet Explorer don't support adding nodes from a different document.