@fortawesome/angular-fontawesome#FontAwesomeModule TypeScript Examples
The following examples show how to use
@fortawesome/angular-fontawesome#FontAwesomeModule.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: member-details.module.ts From dating-client with MIT License | 6 votes |
@NgModule({
declarations: [
MemberDetailsComponent,
MemberDetailsCardComponent
],
imports: [
CommonModule,
RouterModule.forChild(routes),
MembersModule,
FontAwesomeModule,
GoBackModule,
TimeAgoModule,
TabsModule.forRoot(),
CarouselModule.forRoot(),
],
})
export class SettingsModule { }
Example #2
Source File: app.module.ts From mini-projects-2021 with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
DashboardComponent,
PageNotfoundComponent,
TopNavbarComponent,
SideNavbarComponent,
FooterComponent,
AboutUsComponent,
ContactUsComponent,
DashboardCardsComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
CommonModule,
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(library: FaIconLibrary) {
// Add multiple icons to the library
library.addIcons(fasStar, farStar, farAddressCard, farCalendarAlt);
}
}
Example #3
Source File: icons.module.ts From dayz-server-manager with MIT License | 6 votes |
@NgModule({
exports: [FontAwesomeModule],
})
export class IconsModule {
public constructor(library: FaIconLibrary) {
library.addIconPacks(
fontAwesomeSolidIcons,
fontAwesomeRegularIcons,
fontAwesomeBrandsIcons,
);
}
}
Example #4
Source File: app.module.ts From ngx-htaccess-generator with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
TroubleShootingComponent,
NavbarComponent,
GeneratorComponent,
HelpfulResourcesComponent,
PreviewTerminalComponent,
QuestionFormComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
TranslocoRootModule,
FontAwesomeModule,
BrowserAnimationsModule,
CollapseModule.forRoot(),
NgToggleModule,
FormsModule,
BsDropdownModule.forRoot(),
NtkmeButtonModule,
TooltipModule.forRoot(),
NgxCodejarModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
constructor(private library: FaIconLibrary) {
library.addIconPacks(fas, far);
}
}
Example #5
Source File: employee-list.module.ts From employee-crud-api with MIT License | 6 votes |
@NgModule({
imports: [
CommonModule,
ReactiveFormsModule,
RouterModule.forChild(routes),
FontAwesomeModule
],
exports: [RouterModule],
declarations: [EmployeeListComponent],
providers: [],
})
export class EmployeeListModule { }
Example #6
Source File: employee-form.module.ts From employee-crud-api with MIT License | 6 votes |
@NgModule({
imports: [
CommonModule,
ReactiveFormsModule,
RouterModule.forChild(routes),
FontAwesomeModule
],
exports: [RouterModule],
declarations: [EmployeeFormComponent],
providers: [],
})
export class EmployeeFormModule { }
Example #7
Source File: tabs.module.ts From mycoradar with MIT License | 6 votes |
@NgModule({
imports: [
IonicModule,
CommonModule,
FormsModule,
TabsPageRoutingModule,
FontAwesomeModule
],
declarations: [TabsPage]
})
export class TabsPageModule {}
Example #8
Source File: app.module.ts From mycoradar with MIT License | 6 votes |
@NgModule({
declarations: [AppComponent],
entryComponents: [],
imports: [
BrowserModule,
IonicModule.forRoot(),
AppRoutingModule,
SharedModule,
FontAwesomeModule,
HttpClientModule,
IonicStorageModule.forRoot({
name: '_coradar',
driverOrder: ['indexeddb', 'sqlite', 'websql']
}),
],
providers: [
StatusBar,
SplashScreen,
BluetoothLE,
BLE,
File,
BackgroundMode,
BluetoothSerial,
{provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
PushService,
DatabaseService,
Device,
UniqueDeviceID
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #9
Source File: settings.module.ts From dating-client with MIT License | 6 votes |
@NgModule({
declarations: [
SettingsLayoutComponent,
SettingsHeaderComponent,
MemberEditNavigationComponent,
MemberEditAccountComponent,
MemberEditProfileComponent,
MemberEditPhotosComponent,
],
imports: [
CommonModule,
ReactiveFormsModule,
RouterModule.forChild(routes),
SettingsStoreModule,
FileUploaderModule,
FontAwesomeModule,
ErrorAlertModule,
TagInputModule,
SpinnerModule,
],
providers: [
SettingsGuard,
PhotosGuard
]
})
export class SettingsModule { }
Example #10
Source File: members-search.module.ts From dating-client with MIT License | 6 votes |
@NgModule({
declarations: [
MembersSearchComponent,
MembersSearchFormComponent
],
imports: [
CommonModule,
RouterModule.forChild(routes),
ReactiveFormsModule,
FontAwesomeModule
],
exports: [
RouterModule
]
})
export class MembersSearchModule {
}
Example #11
Source File: all-members.module.ts From dating-client with MIT License | 6 votes |
@NgModule({
declarations: [
MembersComponent,
MemberCardComponent
],
imports: [
CommonModule,
RouterModule.forChild(routes),
MembersModule,
SpinnerModule,
ErrorAlertModule,
FontAwesomeModule,
],
})
export class AllMembersModule { }
Example #12
Source File: app.module.ts From 1hop with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
MigrationComponent,
BaseComponent,
NoContentComponent,
ImportComponent,
ManageComponent,
MigrateComponent
],
imports: [
BrowserAnimationsModule,
AppRoutingModule,
NgbAlertModule,
NgbDropdownModule,
FontAwesomeModule,
NgbDropdownModule,
FormsModule,
NgbModule,
HttpClientModule,
LoadingSpinnerModule,
ModalModule.forRoot(),
NgbToastModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
'serviceWorker' in navigator && environment.production
}),
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #13
Source File: layout.module.ts From dating-client with MIT License | 6 votes |
@NgModule({
declarations: [
NavigationComponent,
MainLayoutComponent,
EmptyLayoutComponent,
ThemeToggleComponent,
NotFoundComponent
],
imports: [
CommonModule,
RouterModule,
FontAwesomeModule,
BsDropdownModule.forRoot({
isAnimated: true,
autoClose: true
}),
]
})
export class LayoutModule {
}
Example #14
Source File: transactions-table.module.ts From thorchain-explorer-singlechain with MIT License | 6 votes |
@NgModule({
declarations: [TransactionsTableComponent],
imports: [
CommonModule,
PipesModule,
FontAwesomeModule,
TxDetailTableDataModule,
RouterModule
],
exports: [TransactionsTableComponent]
})
export class TransactionsTableModule { }
Example #15
Source File: nodes-table.module.ts From thorchain-explorer-singlechain with MIT License | 6 votes |
@NgModule({
declarations: [NodesTableComponent],
imports: [
CommonModule,
PipesModule,
RouterModule,
FontAwesomeModule,
],
exports: [NodesTableComponent]
})
export class NodesTableModule { }
Example #16
Source File: app.module.ts From 1x.ag with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
BaseComponent,
NoContentComponent,
HowItWorksComponent
],
imports: [
BrowserAnimationsModule,
AppRoutingModule,
FormsModule,
NgbModule,
HttpClientModule,
LoadingSpinnerModule,
ModalModule.forRoot(),
DeviceDetectorModule.forRoot(),
NgbToastModule,
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: navigator.userAgent.toLowerCase().indexOf('android') === -1 &&
'serviceWorker' in navigator && environment.production
}),
FontAwesomeModule,
AngularPageVisibilityModule
],
providers: [
{provide: LocationStrategy, useClass: HashLocationStrategy}
],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #17
Source File: leverage.module.ts From 1x.ag with MIT License | 6 votes |
@NgModule({
declarations: [LeverageComponent, CreatePositionComponent, MyPositionsComponent, LeverageChartDialogComponent],
imports: [
CommonModule,
LeverageRoutingModule,
FormsModule,
ButtonsModule,
FontAwesomeModule,
TooltipModule.forRoot(),
OiUiModule,
ReactiveFormsModule,
LoadingSpinnerModule,
NgbAlertModule,
ChartsModule
],
entryComponents: [
LeverageChartDialogComponent
]
})
export class LeverageModule {
}
Example #18
Source File: app.module.ts From gnosis.1inch.exchange with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
SlippageSettingsComponent,
GasSettingsComponent
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
BrowserAnimationsModule,
MatButtonModule,
MatSelectModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
MatFormFieldModule,
MatTooltipModule,
MatIconModule,
MatRadioModule,
NgxWebstorageModule.forRoot(),
MatAutocompleteModule,
NgxMatSelectSearchModule,
MatExpansionModule,
FontAwesomeModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #19
Source File: app.module.ts From nica-os with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
...components,
...directives,
...pipes
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
FontAwesomeModule,
CommonsModule,
StoreModule.forRoot({app: appReducer, fs: fileExplorerReducer}),
EffectsModule.forRoot([AppEffects]),
StoreDevtoolsModule.instrument({maxAge: 25, logOnly: environment.production})
],
providers: [...services],
bootstrap: [AppComponent]
})
export class AppModule {}
Example #20
Source File: app.module.ts From msfs-community-downloader with GNU Affero General Public License v3.0 | 6 votes |
@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
FormsModule,
HttpClientModule,
CoreModule,
SharedModule,
HomeModule,
ListEditorModule,
ImportModule,
SettingsModule,
AppRoutingModule,
FontAwesomeModule,
TranslateModule.forRoot({
loader: {
provide: TranslateLoader,
useFactory: HttpLoaderFactory,
deps: [HttpClient]
}
})
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #21
Source File: pool-members-table.module.ts From thorchain-explorer-singlechain with MIT License | 6 votes |
@NgModule({
declarations: [PoolMembersTableComponent],
imports: [
CommonModule,
PipesModule,
FontAwesomeModule,
RouterModule,
FormsModule,
ChartsModule,
ContentItemModule
],
exports: [PoolMembersTableComponent]
})
export class PoolMembersTableModule { }
Example #22
Source File: error.module.ts From thorchain-explorer-singlechain with MIT License | 6 votes |
@NgModule({
declarations: [ErrorComponent],
imports: [
CommonModule,
FontAwesomeModule
],
exports: [ErrorComponent]
})
export class ErrorModule { }
Example #23
Source File: app.module.ts From Angular-Cookbook with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
FolderComponent,
FoldersListComponent,
FileComponent,
],
imports: [BrowserModule, AppRoutingModule, FontAwesomeModule, DragDropModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #24
Source File: app.module.ts From Angular-Cookbook with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
FolderComponent,
FoldersListComponent,
FileComponent,
],
imports: [BrowserModule, AppRoutingModule, FontAwesomeModule],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
Example #25
Source File: employee-list.component.spec.ts From employee-crud-api with MIT License | 5 votes |
describe('EmployeeListComponent', () => {
let employeeListComponent: EmployeeListComponent;
let fixture: ComponentFixture<EmployeeListComponent>;
let employeeServiceSpy: jasmine.SpyObj<EmployeeService>;
beforeEach(() => {
const mockEmployeeService = {
createNewEmployee: (employee: Employee) => of({}),
updateEmployee: (employee: Employee) => of({}),
deleteEmployee: (id: number) => of({}),
getEmployee: (id: number) => of({
name: '',
job_role: '',
salary: '',
birth: '',
employee_registration: '',
}),
getEmployees: () => of([])
};
TestBed.configureTestingModule({
imports: [CommonModule, ReactiveFormsModule, FontAwesomeModule],
providers: [
EmployeeListComponent,
{ provide: EmployeeService, useValue: mockEmployeeService },
],
});
fixture = TestBed.createComponent(EmployeeListComponent);
employeeListComponent = fixture.componentInstance;
employeeServiceSpy = TestBed.inject(EmployeeService) as jasmine.SpyObj<EmployeeService>;
});
describe('Initialization', () => {
it('should be created', () => {
expect(employeeListComponent).toBeTruthy();
});
it('should init', () => {
const spy_ngOnInit = spyOn(employeeListComponent, 'ngOnInit').and.callThrough();
employeeListComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
});
describe('identify', () => {
it('should makes expected calls without item', () => {
const spy_identify = spyOn(employeeListComponent, 'identify').and.callThrough();
employeeListComponent.identify(0, null);
expect(spy_identify).toHaveBeenCalled();
});
it('should makes expected calls with item', () => {
const spy_identify = spyOn(employeeListComponent, 'identify').and.callThrough();
const employee = { employee_id: 1 } as Employee;
employeeListComponent.identify(0, employee);
expect(spy_identify).toHaveBeenCalled();
});
});
describe('deleteEmployee', () => {
it('should makes expected calls with dismiss', () => {
spyOn(Swal,"fire").and.returnValue(Promise.resolve({ isConfirmed: false, isDismissed: true, dismiss: Swal.DismissReason.cancel }));
const spy_deleteEmployee = spyOn(employeeListComponent, 'deleteEmployee').and.callThrough();
employeeListComponent.deleteEmployee(1);
expect(spy_deleteEmployee).toHaveBeenCalled();
});
it('should makes expected calls with confirm', () => {
spyOn(Swal,"fire").and.returnValue(Promise.resolve({ isConfirmed: true, isDismissed: false }));
const spy_deleteEmployee = spyOn(employeeListComponent, 'deleteEmployee').and.callThrough();
employeeListComponent.deleteEmployee(1);
expect(spy_deleteEmployee).toHaveBeenCalled();
});
});
});
Example #26
Source File: app.module.ts From tzcolors with MIT License | 5 votes |
@NgModule({
declarations: [
AppComponent,
HeaderItemComponent,
LandingComponent,
FooterItemComponent,
ColorCardItemComponent,
ExploreComponent,
AuctionsComponent,
MyColorsComponent,
AuctionModalComponent,
ColorHistoryModalComponent,
ShortenPipe,
AmountConverterPipe,
CountdownComponent,
ColorCardListComponent,
WatchlistComponent,
ActivityComponent,
StatsComponent,
AddressDetailComponent,
TokenDetailComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule,
BsDropdownModule.forRoot(),
FontAwesomeModule,
AlertModule.forRoot(),
ModalModule.forRoot(),
NgxChartsModule,
AccordionModule.forRoot(),
CollapseModule.forRoot(),
MomentModule,
StoreModule.forRoot(reducers, {
metaReducers,
}),
EffectsModule.forRoot([AppEffects, ConnectWalletEffects]),
!environment.production ? StoreDevtoolsModule.instrument() : [],
FormsModule,
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {
constructor(library: FaIconLibrary) {
library.addIcons(fasStar, faCog, faDog, faWindowRestore)
library.addIcons(
farStar,
farMoon,
farSun,
faSortAmountUp,
faSortAmountDown,
faSortAlphaUp,
faSortAlphaDown
)
}
}
Example #27
Source File: app.module.ts From thorchain-explorer-singlechain with MIT License | 5 votes |
@NgModule({
declarations: [
AppComponent,
SearchComponent,
HeaderComponent,
BreadcrumbComponent,
NetworkToggleComponent,
ExplorerComponent,
ExplorerUiComponent,
QueryInputComponent,
ResponseLinksComponent,
],
imports: [
BrowserModule,
HttpClientModule,
AppRoutingModule,
FormsModule,
FontAwesomeModule,
ChartsModule,
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production })
],
providers: [
ThorchainNetworkService,
AssetService,
ConstantsService,
NetworkService,
NodeService,
LastBlockService,
PoolService,
MemberService,
StatsService,
TransactionService,
VersionService,
VolumeService,
UiStyleToggleService,
LocalStorageService,
CoinGeckoService,
{provide: APP_INITIALIZER, useFactory: themeFactory, deps: [UiStyleToggleService], multi: true},
],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #28
Source File: qd-messages-ts.module.ts From qd-messages-ts with GNU Affero General Public License v3.0 | 5 votes |
@NgModule({
declarations: [
QDMessagesComponent,
ChannelComponent,
MatMenuComponent,
FsIconComponent,
ChannelListComponent,
ChannelSidebarRightComponent,
ChannelSidebarLeftComponent,
ChannelParticipantListComponent,
ChannelSettingsComponent,
ChannelTabComponent,
ChannelFavoritesComponent
],
imports: [
NbSidebarModule,
CdkTableModule,
CdkTreeModule,
NbMenuModule,
ClipboardModule,
HttpClientModule,
MatCardModule,
MatSelectModule,
MatButtonModule,
MatCheckboxModule,
MatMenuModule,
CommonModule,
QuestMessengerJSRoutingModule,
FontAwesomeModule,
NbThemeModule,
NbLayoutModule,
NbChatModule,
NbTabsetModule,
NbEvaIconsModule,
NbIconModule,
FormsModule,
NbContextMenuModule,
NbDialogModule.forRoot(),
NbCardModule,
MatTreeModule,
DragDropModule,
MatButtonModule,
MatCheckboxModule,
MatInputModule,
MatFormFieldModule,
ZXingScannerModule,
MatSliderModule,
FlexLayoutModule,
MatIconModule,
LinkyModule
],
exports: [
QDMessagesComponent,
CdkTableModule,
MatFormFieldModule,
MatSelectModule,
MatTreeModule,
MatMenuModule,
],
providers: [
NbDialogService
],
bootstrap: [QDMessagesComponent]
})
export class QDMessagesModule { }
Example #29
Source File: app.component.spec.ts From employee-crud-api with MIT License | 5 votes |
describe('AppComponent', () => {
let appComponent: AppComponent;
let fixture: ComponentFixture<AppComponent>;
let routerSpy: jasmine.SpyObj<Router>;
beforeEach(() => {
const mockRouter = {
events: of({}),
};
TestBed.configureTestingModule({
imports: [CommonModule, ReactiveFormsModule, FontAwesomeModule],
providers: [
AppComponent,
SlimLoadingBarService,
{ provide: Router, useValue: mockRouter },
],
});
fixture = TestBed.createComponent(AppComponent);
appComponent = fixture.componentInstance;
routerSpy = TestBed.inject(Router) as jasmine.SpyObj<Router>;
});
describe('Initialization', () => {
it('should be created', () => {
expect(appComponent).toBeTruthy();
});
it('should init not EventNavigation', () => {
const spy_ngOnInit = spyOn(appComponent, 'ngOnInit').and.callThrough();
appComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
it('should init with NavigationStart', () => {
const event = new NavigationStart(0, 'URI');
(<any>routerSpy.events) = of(event);
const spy_ngOnInit = spyOn(appComponent, 'ngOnInit').and.callThrough();
appComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
it('should init with NavigationEnd', () => {
const event = new NavigationEnd(0, 'URI', 'URL');
(<any>routerSpy.events) = of(event);
const spy_ngOnInit = spyOn(appComponent, 'ngOnInit').and.callThrough();
appComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
it('should init with NavigationCancel', () => {
const event = new NavigationCancel(0, 'URI', 'FAIL');
(<any>routerSpy.events) = of(event);
const spy_ngOnInit = spyOn(appComponent, 'ngOnInit').and.callThrough();
appComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
it('should init with NavigationError', () => {
const event = new NavigationError(0, 'URI', {});
(<any>routerSpy.events) = of(event);
const spy_ngOnInit = spyOn(appComponent, 'ngOnInit').and.callThrough();
appComponent.ngOnInit();
expect(spy_ngOnInit).toHaveBeenCalled();
});
});
});