I have a component with a sub component timeline
.
<app-timeline [(editing)]="editingDate"></app-timeline>
In the timeline component I have these properties:
@Input() editing: boolean; // <--- detect change on this
@Output() editingChange = new EventEmitter();
How can I check when a change to the editing
property occurs from the timeline component? I need to emit the editing value whenever it changes.
Should I use a setter for the editing property then emit from there?
private _editing
set editing() { ... // emit }
Or is there another way?