I want to load an AngularJS app inside a “friendly” IFRAME (due to SEO reasons).
See example code here: https://jsfiddle.net/tomsoderlund/mssca32k/
var embedDiv = document.getElementById('weld-embed');
// Create friendly IFRAME
var newIframe = document.createElement('iframe');
newIframe.src = 'about:blank';
newIframe.width = '100%';
newIframe.height = '100%';
newIframe.frameBorder = '0';
embedDiv.appendChild(newIframe);
// Create contents inside
var htmlContent = '<!doctype html>'
// ...
+ '<\/body><\/html>';
newIframe.contentWindow.document.write(htmlContent);
The AngularJS app doesn’t start up, probably because document.ready doesn’t trigger in a normal fashion. Can I bootstrap/force the AngularJS code to start up?