Running a standalone Angular App within an iframe on the front end

Jay Crowe asked on December 17, 2018 18:46

Hi,

I am looking for some advice on how I could display a standalone angular app within the front end of my Kentico Site?

I was thinking of creating a web part which basically loaded the angular app within an iframe where the source of the iframe would just be pointing to a html file.

I have done the above but for some reason the iframe loads the admin sign in page and it is as if Kentico is treating the html page as a backend page.

Any help would be appreciated.

Cheers, Jay

Correct Answer

Jay Crowe answered on December 19, 2018 09:48

Thank you for your replies Rui and Michal. I managed to get this working by excluding the URL to the Media Library where the angular app is being stored. I created a new web part because I wanted a dynamic Web Part that users could use anywhere on the site and just point it at the index.html page of an angular app.

0 votesVote for this answer Unmark Correct answer

Recent Answers


Rui Wang answered on December 18, 2018 21:58 (last edited on December 18, 2018 21:59)

What happens if you put the URL for the iframe page directly to the browser? Does it redirects to admin login page? Can the URL be resolved?

Also, why do you need a web part for it if you can use Static HTML web part and paste in the iframe HTML.

0 votesVote for this answer Mark as a Correct answer

Michal Samuhel answered on December 19, 2018 08:21

Just to add to Rui, I have worked with a project, which had used a React app to display and filter products loaded via WebApi and whole react app was running within single Div used as a container and whole JS app was added to the project as a single script.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.