angular 三方插件创建html使用template
html: <ng-template #popTpl> <div> <p>title</p> <p>content</p> </div> </ng-template> ts: @ViewChild("popTpl") popTpl; constructor(private viewRef: ViewContainerRef) {} createInfo() { const obj = this.pick?.id; const entity = new Cesium.Entity({ name: obj?._name, description: this.viewRef.createEmbeddedView(this.popTpl).rootNodes[0].innerHTML }); this.viewer.selectedEntity = entity; }