I am trying to get the width of the tab.
And I expect to get like nativeElement.clientWidth
If I use ViewChild like:
@ViewChild('matTab', {static: false}) matTab: ElementRef;
<mat-tab label="Overview" #matTab>Overview</mat-tab>
But I try to read matTab
by console.log(this.matTab)
It shows:
I can't find nativeElement
.
Do I have to use document.getElementByID
?