【发布时间】:2017-09-06 06:41:39
【问题描述】:
在 wordpress REST API 中有类似的值
"content": {
"rendered": "<div class=\"pro-info\">\n<p>Villes & Paysages, an Egis Group subsidiary, is an urban planning and design agency for public spaces. Their approach is based on the creation of favorable conditions for the expression of bodies in motion: to create an urban composition capable of transcending technical standards, management of flows, integration of infrastructures, economic dynamics … Villes & Paysages asked us to rethink their visual identity as well as their website.</p>\n<p><img src=\"http://dev.twinsway.com/ty001/wp-content/uploads/2017/08/pr2-6.jpg\" alt=\"\" /></p>\n</div>\n<p><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/rHmk0UhJSb4\" frameborder=\"0\" allowfullscreen></iframe></p>\n"
我的角度代码就像
<div class="container">
<div [innerHTML]="singleDetails.content.rendered"> </div>
</div>
所有其他 div 都工作正常。但 iframe 在 angular2 中不起作用。 请帮我。 提前致谢
【问题讨论】:
-
开发控制台中的任何错误?
-
没有控制台错误
标签: json wordpress angular rest