I have a component with an input signal
value = input<number>()
I would like to trigger a method when value()
changes.
The old method would be to use a setter:
@Input('value') set value( val:number ) {
//call the method
this.myMethod()
}
or use ngOnChange
.
What is the proper way to achieve that?