我使用 Angular 和 OpenLayers。单击角度按钮时,我调用函数(内部服务)执行以下操作:
this.draw.on('drawend', function(event) {
this.drawEvent.next([this.feature, this.featureLayer]);
});
drawEvent 应该调用组件,但没有任何反应。 当我在 this.draw.on 之外发出 drawEvent 时它工作正常。
它与 NgZone 有什么关系吗?我是 Angular 的初学者,任何提示都会有所帮助。