AfterContentInit
组件或指令的内容初始化完成后触发。
(OnInit 之后)
import { Component, AfterContentInit } from '@angular/core';
@Component({
selector: 'so-aftercontentinit-component',
templateUrl: 'aftercontentinit-component.html',
styleUrls: ['aftercontentinit-component.']
})
class AfterContentInitComponent implements AfterContentInit {
ngAfterContentInit(): void {
console.log('Component content have been loaded!');
}
}