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.

2
  • 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. Commented Jan 13, 2014 at 21:10
  • [here is another question][1] which demonstrates how you can send content to iFrame. [1]: stackoverflow.com/questions/19125910/… Commented Jan 20, 2014 at 5:40

1 Answer 1

-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>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.