更新时间:2021-09-20 04:27:08
如果将模板插入innerHtml属性并使用DomSanitizer,它将像组件一样转换它,从而为您带来延迟加载效果.
If you inject your template in the innerHtml attribute and use the DomSanitizer, it will translate it just like a component, giving you the lazy load effect.
<div [innerHTML]="myComponentsTemplate"></div>