https://angular.io/guide/lifecycle-hooks#afterview
用法:
import {
Component,ElementRef,Input,Inject,SimpleChange,ViewChild,forwardRef,OnInit,OnChanges,AfterViewInit,EventEmitter,Output }
from
'@angular/core';
export
class
StagedOrdersGridComponent
implements OnInit,OnChanges,AfterViewInit {
ngAfterViewInit()
:
void {
this.
onResize();
}
简洁明了 就这样- -哈哈。。