详解Angular 中 ngOnInit 和 constructor 使用场景 1.constructorconstructor应该是ES6中明确使用constructor来表示构造函数的,构造函数使用在class中 ngOnInit