【发布时间】:2022-07-11 02:35:41
【问题描述】:
我需要在标记处显示单击另一个角度组件的内容,将标记的 id 作为参数传递给...我没有找到可行的解决方案...直到我显示简单的 html 一切正常...
目前我的代码是
var component = this.viewContainerRef.createComponent(MainPostCardComponent);
marker.bindPopup(L.popup(
component
));
marker.bindPopup(component.location.nativeElement);
marker.on('click', function (e) {
if (this.currentSelectedMarker != null) {
console.log("found previous item, resetting color");
this.currentSelectedMarker.setIcon( new svgIcon);
}//
// marker.setIcon( new svgSelectedIcon);
this.currentSelectedMarker = marker;
marker.openPopup();
});
但这不起作用...有什么建议吗?
【问题讨论】: