Monday, June 25, 2018

firstChange with SimpleChanges at ngOnChanges in an Angular 4 application

Alright this if condition is going to get met if the myInput input changes for the first time:

ngOnChanges(changes: SimpleChanges) {
   if(changes.myInput.firstChange) {
      alert('it changed!');

No comments:

Post a Comment