首页 > 其他 > 详细

[Angular] Two things about OnChanges Lifecycle hook

时间:2019-01-29 19:36:43      阅读:169      评论:0      收藏:0      [点我收藏+]

1. ngOnChanges is called before ngOnInit but after constructor()

2. ngOnChanges is called because of @Input() obj, obj‘s reference changes. If you mutate one the object‘s prop, it won‘t trigger ngOnChanges, you have to create new object.

[Angular] Two things about OnChanges Lifecycle hook

原文:https://www.cnblogs.com/Answer1215/p/10335507.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!