问题描述
从我的api中,我将获得包含脚本和CSS的html整页。
所以我需要在角度应用程序中绑定到我的div中。 它将动态地出现。
但是它不能正常工作。 -脚本和CSS没有绑定
-我提到一些有角度的链接将对内容进行消毒。但是我的情况下我需要解决方案。
<div [innerHTML]="DynamicFormHtml"></div>
DynamicFormHtml:string="<!DOCTYPE html><html><head><script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script><script>;$(document).ready(function(){$('button').click(function(){$('div').animate({left:'250px'})})});</script></head><body><button>Start Animation</button><p>By default,all HTML elements have a static position,and cannot be moved. To manipulate the position,remember to first set the CSS position property of the element to relative,fixed,or absolute!</p><div style='background:#98bf21;height:100px;width:100px;position:absolute'></div></body></html>";
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)