我正在尝试为我的角度数据表使用角度材质图标。我为我的角度数据表遵循这个toturial。我看到相同的代码在他的屏幕上显示了一个漂亮的图标,而我的屏幕上却显示了一个丑陋的图标,
这是我的代码。
datatable css 文件代码。
.full-width-table {
width: 100%;
}
datatable 组件 html 文件代码。
.....
.....
<ng-container matColumnDef="actions">
<mat-header-cell *matHeaderCellDef></mat-header-cell>
<mat-cell *matCellDef="let row">
<button mat-icon-button><mat-icon>launch</mat-icon></button>
<!-- <button mat-icon-button color="warn"><mat-icon>delete_outline</mat-icon></button> -->
</mat-cell>
</ng-container>
....
....
我的 appModule 文件
@NgModule({
imports: [
BrowserModule,BrowserAnimationsModule,AppRoutingModule,AppAsideModule,AppBreadcrumbModule.forRoot(),AppFooterModule,AppHeaderModule,AppSidebarModule,PerfectScrollbarModule,BsDropdownmodule.forRoot(),TabsModule.forRoot(),ChartsModule,SelectDropDownmodule,FormsModule,ReactiveFormsModule,Commonmodule,CollapseModule,HttpClientModule,MatTableModule,MatPaginatorModule,MatsortModule,MatIconmodule
],...
我已将此链接包含在我的 index.html 中
<link rel="shortcut icon" href="assets/favicon.ico">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
为什么我得到了一个丑陋的图标,但我的导师却得到了具有相同代码的漂亮图标。 什么事情需要做才能得到正确的。你可以通过附加图片看到我得到的。