I want to trigger a function if a flag variable is changed. I read about ngOnChanges only works with @Input whereas I have a variable.
isFormCompleted: boolean = false;
ngOnInit() {
this.checkComplete();
}
checkComplete() {
/**
* Checks if all conditions are valid and then turns the flag variable to true
**/
this.isFormCompleted = true;
}
Now I want to fire a function as soon as the flag variable is changed to true. How do I achieve that?