When I press an arrow in the parent element I always emit true. The child receives the change only at the beginning when the emitter changes from undefined to true. Is there a method to call the function always when the parent emitts something even it's the same value as the lat time?
Parent HTML:
<div (click)="emit()">
<child [changed_slide]= "changed_slide"></child>
Parent .ts:
emit(){this.changed_slide.emit(true);}
Child:
ngOnChanges(changes: { [property: string]: SimpleChange }){
let change: SimpleChange = changes['changed_slide'];
console.log(change);
}
So I want that every time I click the parent div "true" will be emitted (or everything else, I just want something to be emitted in order to do something in the child) and then one function will be automatically triggered in the child. Every time I click the parent the child does something. I would appreciate any ideas, Thank you!