I'm a new learner of Angular. I have a problem with the Angular 10 Material Tabs Component, I'm already tried to follow the angular documentation and other tutorial websites.
The header of tabs is showed up but the content is not. the error shown in the console is like this "ERROR TypeError: Cannot read property 'nativeElement' of undefined"
screenshot of the error in my app
Here are my codes and I'm imported the MatTabsModule in app.module.ts
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-penilaian',
templateUrl: './penilaian.component.html',
styleUrls: ['./penilaian.component.css'],
encapsulation: ViewEncapsulation.None,
})
export class PenilaianComponent implements OnInit {
constructor() {}
ngOnInit(): void {}
}
<mat-tab-group mat-align-tabs="center" class="tab">
<mat-tab label="tab A">
<p>TEST 1</p>
</mat-tab>
<mat-tab label="tab B">
<p>TEST 2</p>
</mat-tab>
<mat-tab label="tab C">
<p>TEST 3</p>
</mat-tab>
</mat-tab-group>