0

1)I have two pages - TestPage1.HTML and TestPage2.HTML

2)TestPage1.HTML has different DIVs with components like - UI-Grid, buttons, text area etc.

3)I have save inner HTML for TestPage1.HTML to database.

4)I display rows of saved records for TestPage1.HTML on TestPage2.HTML

5)And I want to Open - TestPage1 with their saved HTML. Can I achieve it with window.open?

5)Basically - open TestPage1 and then reassign it's HTML content?

  • 1
    I have no idea if this is technically possible, but have you considered using a more standard approach, like a query string/parameter? https://stackoverflow.com/questions/901115/how-can-i-get-query-string-values-in-javascript – ᴓᴓᴓ Oct 27 '21 at 21:02
  • I don't know whether a query string/parameter is going to help. Basically I am looking to build a web page editor with this approach. – RedBottleSanitizer Oct 27 '21 at 21:06
  • 1
    Maybe someone else can help you, but I would personally use a different approach. – ᴓᴓᴓ Oct 27 '21 at 21:23
  • What approach do you suggest I take. Do you think I have explained what I am trying to do correctly or needs to be explained more? – RedBottleSanitizer Oct 27 '21 at 21:29
  • 1
    I'm unfamiliar with Angular, so it would depend what is available. The simplest answer would be using EJS, you could literally just write `<%- codeFromContext %>` https://stackoverflow.com/questions/10326950/render-a-variable-as-html-in-ejs In Angular.. you could try this? https://stackoverflow.com/questions/49013217/how-to-render-string-with-html-tags-in-angular-4 Looks like the same thing but for Angular – ᴓᴓᴓ Oct 27 '21 at 22:09

0 Answers0