📜  角度输入 onchange - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:05.827000             🧑  作者: Mango

代码示例2
export class MyClassName implements OnInit,OnChanges {
 @Input() documents: Document[] = [];
.....
ngOnChanges(changes: SimpleChanges){
    console.log("changes ", changes)
    if(changes.documents){
      console.log("changes2 ", changes)
    }
  }