<div draggable (dragging)="copyDragging($event)">
copyDragging(event) {
console.log('copyDragging :', event); // good
this.copyBoxDragging = event; // not reflected in html
}
@Output() dragging = new EventEmitter();
mousedrag$.subscribe(() => {
if (!this._dragging) {
this.dragging.emit(true);
this._dragging = true;
}
});
请参见parent.component.ts]中的[C0?始终正确打印期望值。但在父组件(下一行)中赋值不会反映在父html
中有什么阻止我在父组件中分配发射值吗?
尝试强制更改检测
console.log