I want to exec a function every time when the @Input is changed. I tried to do it that way:
ngOnChanges(changes: { [propName: string]: SimpleChange }) {
if( changes['inputName'] && changes['inputName'].previousValue != changes['inputName'].currentValue ) {
this.func();
}
}
but my problem is: my @Input value is'nt necessarily changed (it can be "a" and another once "a") but even if it's not changed I want to exec the function. what can I do?