![angular iframe angular iframe](https://reader021.fdocumento.com/reader021/slide/20170802/55cf9daf550346d033aeb457/document-10.png)
Create a pipe for HTML sanitizer and make it available for component usage.
#ANGULAR IFRAME CODE#
Inject this HTML code into Component variable for template processor.Get HTML embed code from Iframely API fetched in either of API endpoints (this step is omitted in this guide).Please add our embed.js to your page on your own and call iframely.load() in any case to make those features work for you.
![angular iframe angular iframe](https://blog.johnwu.cc/images/a/291.png)
Iframely’s own summary cards and lazy-loaded iFrames go with our script anyway. Please make such exception in case you feel like dealing with some of publisher’s scripts on your own. You can make exception in your settings to get code from specific publishers as-is, without Iframely wrappers. Once you add HTML for rich media embed code to your page, you also call iframely.load() to trigger Iframely unfurling logic explicitly.
![angular iframe angular iframe](https://i.stack.imgur.com/2pYrh.png)
But you’ll need to load embed.js to your page on your own anyway, because Angular won’t execute any inline scripts.
![angular iframe angular iframe](https://reader022.fdocument.org/reader022/reader/2020061514/5ea8c326e6afb2140a0bca74/r-4.jpg)
But I don't have any luck getting it to work. After searching the web I have found a few possible solutions - apparently an iframe is the key. I'm trying to unload Unity and can't get it to work (The audioclip inside Unity still plays). Unity loads, communication works (loading specific assetbundles and images) and calls from Unity reach the Angular methods I specified. I also need to send some data between Angular and Unity. I'm not an Angular master, but I'm building an Angular website where Unity is embedded, only on certain pages.