I wrote an angular single page application which generates a full HTML document as a string (from doctype to </html>
).
I would like to render that string at a given url (using ngroute?).
Currently, I populate an iframe
on the same page with the generated string.
Is it possible to render a full HTML string document in angular?
Here are a snippet of the app:
appLSS.controller('ctlLSS', function($scope, $http, $sce, $location) {
$scope.html_document = null;
...
$scope.generate = function() {
$scope.html_document = '<!doctype html><html> ... </html>';
var frames = window.frames;
frames[0].document.write($sce.trustAsHtml($scope.html_document));
};
});