ngOnDestroy ngOnDestroy 当组件被销毁之前调用, 用于清理操作export class HomeComponent implements OnDestroy { ngOnDestroy() { console.log("组件被卸载") }}