我有一些使用Angular Material的选项卡。我试图在标题前插入图片/图标,但是似乎看不到该怎么做?我正在使用Angular 7版本。到目前为止,我的代码是:
html.file
<div class="tabs">
<nav mat-tab-nav-bar mat-align-tabs="left">
<a mat-tab-link
*ngFor="let link of navLinks"
[routerLink]="link.path"
routerLinkActive #rla="routerLinkActive"
[active]="rla.isActive">
{{link.label}}
</a>
</nav>
</div>
ts.file
export class ContentAreaComponent implements OnInit {
navLinks = [
{path: 'details', label: 'V Details'},
{path: 'select', label: 'Product'},
{path: 'clselect', label: 'Client Details'},
];
}
答案 0 :(得分:1)