build: add angular font awesome
* Add angular font awesome * Add custom shared module for icons
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<button mat-button (click)="inputFile.click()">
|
||||
<mat-icon>file_upload</mat-icon>
|
||||
<fa-icon icon="file-upload" size="lg"></fa-icon>
|
||||
|
||||
Upload an image
|
||||
</button>
|
||||
{{ filename }}
|
||||
{{ filename || 'No File Uploaded' }}
|
||||
<input type="file" #inputFile (change)="onFileSelected($event)" [style.display]="'none'" />
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
||||
import { library } from '@fortawesome/fontawesome-svg-core';
|
||||
import {
|
||||
faFileUpload,
|
||||
faSearch
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
// Add an icon to the library for convenient access in other components
|
||||
library.add(
|
||||
faFileUpload,
|
||||
faSearch
|
||||
);
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [],
|
||||
exports: [FontAwesomeModule]
|
||||
})
|
||||
export class IconsModule { }
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { LoaderComponent } from './loader/loader.component';
|
||||
import { FileUploadComponent } from './file-upload/file-upload.component';
|
||||
import { DeleteDialogComponent } from './delete-dialog/delete-dialog.component';
|
||||
|
||||
import { MaterialModule } from './material.module';
|
||||
import { IconsModule } from './icons.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
IconsModule,
|
||||
MaterialModule
|
||||
],
|
||||
declarations: [
|
||||
@@ -19,6 +22,7 @@ import { MaterialModule } from './material.module';
|
||||
exports: [
|
||||
CommonModule,
|
||||
FileUploadComponent,
|
||||
IconsModule,
|
||||
LoaderComponent,
|
||||
MaterialModule
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user