Angular uses nz-zorro, hoping to get the height of the nz-header component, using the following methods:
<nz-header style="background: -sharpfff; padding:0;" -sharpheader>
<i class="trigger" nz-icon [type]="isCollapsed?"menu-unfold":"menu-fold"" (click)="isCollapsed=!isCollapsed"></i>
</nz-header>
@ViewChild("header") header: ElementRef;
console.log(this.header.nativeElement.offsetHeight);
in this way, the code will report an error. Header does not have the attribute of nativeElement. How can I get the height of the nz-header component?
Thank you.