1

my angular app is an html editor which sends the template to a server where it is rendered with dynamic data and returned to the client where it should be inserted into an iframe (for preview purpose). ng-bind-html seams not to work in combination with an iframe. is there a way to set the content of an iframe dynamically with angularjs?

edit: the main problem of these templates is that they correspond to completly independent html documents (doctype, css, markup, etc.); hence it is necessary to encapsulate the rendered result within some kind of sandbox.

MrMuh
  • 319
  • 1
  • 4
  • 13
  • the main problem of these templates is that they correspond to completly independent html documents (doctype, css, markup, etc.); hence it is necessary to encapsulate the rendered result within some kind of sandbox. – MrMuh Jan 13 '14 at 21:10
  • [here is another question][1] which demonstrates how you can send content to iFrame. [1]: http://stackoverflow.com/questions/19125910/is-it-possible-to-update-angularjs-expressions-inside-of-an-iframe – Vikram Jan 20 '14 at 05:40

1 Answers1

-3

I don't know how to send content to iframe but you can use ng-include instead of iframe.

<div ng-include="frameUrl" ></div>
Alborz
  • 6,843
  • 3
  • 22
  • 37