摘要: constructor和OnInit的区别和适用场景 一、区别 1.1 constructor Es6中引入了类的概念,constructor是类中的特殊函数,并不属于Angular的范畴,Angular不能控制constructor,constructor会在类生成实例时自动被调用。 1.2 ng 阅读全文
posted @ 2019-06-14 10:37 console.log('宇航') 阅读(532) 评论(0) 推荐(0) 编辑