Angular Link 将在 sanitizer 之后刷新页面而不是刷新 IFRAME

问题描述

所以我有一个 SVG 地图,其中每个 svg g 都包含在一个标签中。

我使用它是为了用标签的来源填充 IFRAME。

The visual representation of an appartment

代码看起来没问题,它以前工作过,我清理了 html,IFRAME 具有正确的名称,而 的目标是 iframe 的名称。但是有了所有这些,它不是在 iframe 中打开链接而是刷新页面。我错过了什么?

消毒功能

transform(value) {
    return this.sanitized.bypassSecurityTrustHtml(value);
}

IFRAME 和 HTML 占位符

                            <div id="vt" class="container tab-pane">

                                <div #vtContainer id="vt-container" [innerHTML]="transform(assetDetail.virtualTourImages[assetDetail.virtualTourImages.length - 1].virtualTourImageLink)"> </div>

                                <iframe name="search_iframe"></iframe>

                            </div>

SVG 块示例

<a href="https://momento360.com/e/u/1651b291bf714fc5a9d790cf4450d104?utm_campaign=embed&amp;utm_source=other&amp;heading=138.86&amp;pitch=-3.08&amp;field-of-view=75&amp;size=medium" target="search_iframe">
                <g>
                    <path id="dormitor3" fill="#e5e3ce" d="M0 315h158v127H0z"></path>
                    <text font-family="Verdana" font-size="22.5" fill="#333">
                        <textPath xlink:href="#dormitor3">
                            Dormitor 3
                        </textPath>
                    </text>
                </g>
 </a>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)