Angular ngOnInit默认提供生命周期钩子.
ngOnInit
ngOnInit如果我们已经有了,为什么要使用constructor?
constructor
typescript ngoninit angular
angular ×1
ngoninit ×1
typescript ×1