Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

angular onChange onChanges SimpleChanges

export class MyClassName implements OnInit,OnChanges {
 @Input() documents: Document[] = [];
.....
ngOnChanges(changes: SimpleChanges){
    console.log("changes ", changes)
    if(changes.documents){
      console.log("changes2 ", changes)
    }
  }
Source by www.stackchief.com #
 
PREVIOUS NEXT
Tagged: #angular #onChange #onChanges #SimpleChanges
ADD COMMENT
Topic
Name
5+9 =