我已经成功地在我的 andular 6 项目中添加了一个加载器,它将在初始加载时显示加载器,直到应用程序完全加载。然而,我似乎无法在微调器中加载一个很棒的字体图标。
app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { AppComponent } from './app.component';
library.add(fab);
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
src/index.html
<body>
<abe-root>
<div class="app-loading">
<div class="logo"><fa-icon [icon]="['fab', 'angular']"></fa-icon></div>
<svg class="spinner" viewBox="25 25 50 50">
<circle class="path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>
</svg>
</div>
</abe-root>
</body>
它没有错误或只是没有显示图标?我对角度相当陌生,所以我可能做错了。