本文整理汇总了TypeScript中@fortawesome/fontawesome-svg-core.library.add方法的典型用法代码示例。如果您正苦于以下问题:TypeScript library.add方法的具体用法?TypeScript library.add怎么用?TypeScript library.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类@fortawesome/fontawesome-svg-core.library
的用法示例。
在下文中一共展示了library.add方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1:
export const loadIcons = () => {
library.add(
faSort,
faEye,
faSync,
faBan,
faTrash,
faArrowLeft,
faSave,
faPlus,
faPencilAlt,
faUser,
faTachometerAlt,
faHeart,
faList,
faTasks,
faBook,
faHdd,
faClock,
faSignInAlt,
faSignOutAlt,
faWrench,
faThList,
faUserPlus,
faAsterisk,
faFlag,
faBell,
faHome,
faRoad
);
};
示例2:
import { faPinterestP } from '@fortawesome/free-brands-svg-icons/faPinterestP';
import { faWhatsapp } from '@fortawesome/free-brands-svg-icons/faWhatsapp';
import { faVk } from '@fortawesome/free-brands-svg-icons/faVk';
import { faFacebookMessenger } from '@fortawesome/free-brands-svg-icons/faFacebookMessenger';
import { faTelegramPlane } from '@fortawesome/free-brands-svg-icons/faTelegramPlane';
import { faMix } from '@fortawesome/free-brands-svg-icons/faMix';
import { faXing } from '@fortawesome/free-brands-svg-icons/faXing';
import { faLine } from '@fortawesome/free-brands-svg-icons/faLine';
import { faCommentAlt } from '@fortawesome/free-solid-svg-icons/faCommentAlt';
import { faMinus } from '@fortawesome/free-solid-svg-icons/faMinus';
import { faEllipsisH } from '@fortawesome/free-solid-svg-icons/faEllipsisH';
import { faLink } from '@fortawesome/free-solid-svg-icons/faLink';
import { faExclamation } from '@fortawesome/free-solid-svg-icons/faExclamation';
import { faPrint } from '@fortawesome/free-solid-svg-icons/faPrint';
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
import { faEnvelope } from '@fortawesome/free-solid-svg-icons/faEnvelope';
import { faLightbulb } from '@fortawesome/free-solid-svg-icons/faLightbulb';
import { faCoffee } from '@fortawesome/free-solid-svg-icons/faCoffee';
import { faInfo } from '@fortawesome/free-solid-svg-icons/faInfo';
import { faBook } from '@fortawesome/free-solid-svg-icons/faBook';
const icons = [
faFacebookF, faTwitter, faLinkedinIn, faGooglePlusG, faPinterestP, faRedditAlien, faTumblr,
faWhatsapp, faVk, faFacebookMessenger, faTelegramPlane, faMix, faXing, faCommentAlt, faBook, faLine,
faEnvelope, faCheck, faPrint, faExclamation, faLink, faEllipsisH, faMinus, faLightbulb, faCoffee, faInfo
];
library.add(...icons);
示例3:
faFlag,
faWrench,
faClock,
faCloud,
faSignOutAlt,
faSignInAlt,
faCalendarAlt,
faSearch,
faTrashAlt,
faAsterisk,
faTasks,
faHome
} from '@fortawesome/free-solid-svg-icons';
// Adds the SVG icon to the library so you can use it in your page
library.add(faUser);
library.add(faSort);
library.add(faSync);
library.add(faEye);
library.add(faBan);
library.add(faTimes);
library.add(faArrowLeft);
library.add(faSave);
library.add(faPlus);
library.add(faPencilAlt);
library.add(faBars);
library.add(faHome);
library.add(faThList);
library.add(faUserPlus);
library.add(faRoad);
library.add(faTachometerAlt);
示例4:
faFacebook,
faYoutube,
} from '@fortawesome/free-brands-svg-icons'
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
import { CollapseModule } from 'ngx-bootstrap/collapse'
import { UserFormService } from './user-form/user-form.service'
import { HttpClientModule } from '@angular/common/http'
import { NgxSpinnerModule } from 'ngx-spinner'
import { ToastrModule } from 'ngx-toastr'
import { CommonModule } from '@angular/common'
// Add an icon to the library for convenient access in other components
library.add(
faBaby,
faArrowCircleLeft,
faArrowCircleRight,
faInstagram,
faFacebook,
faYoutube
)
@NgModule({
declarations: [
AppComponent,
DashboardComponent,
FooterComponent,
HomeComponent,
LoginComponent,
NavbarComponent,
UserFormComponent,
ImageSliderComponent,
],
imports: [
示例5: enableProdMode
import { AddReviewComponent } from '../add-review/add-review.component';
import { AppComponent } from '../app/app.component';
import { AppNavComponent } from '../app-nav/app-nav.component';
import { CourseComponent } from '../course/course.component';
import { CourseResultComponent } from '../course-result/course-result.component';
import { ExploreComponent } from '../explore/explore.component';
import { HomeInstitutionComponent } from '../home-institution/home-institution.component';
import { NotFoundComponent } from '../not-found/not-found.component';
import { ReviewsComponent } from '../reviews/reviews.component';
import { ReviewComponent } from '../review/review.component';
// Styling
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core';
import { fas } from '@fortawesome/free-solid-svg-icons';
library.add(fas);
// Environment
import { enableProdMode } from '@angular/core';
import { environment } from '../../environments/environment.prod';
if (environment.production)
enableProdMode();
@NgModule({
declarations: [
AddReviewComponent,
AppComponent,
AppNavComponent,
CourseComponent,
CourseResultComponent,
示例6:
import { library } from '@fortawesome/fontawesome-svg-core';
import {
faEraser,
faEye,
faTint,
faHandPaper,
faSortAmountUp,
faSortAmountDown,
faHelicopter
} from '@fortawesome/free-solid-svg-icons';
library.add(faEraser);
library.add(faEye);
library.add(faTint);
library.add(faHandPaper);
library.add(faSortAmountUp);
library.add(faSortAmountDown);
library.add(faHelicopter);
示例7:
import Vue from "vue";
import { library, dom } from "@fortawesome/fontawesome-svg-core";
import {
faPlusSquare,
faMinusSquare,
faTrashAlt
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
library.add(faPlusSquare, faMinusSquare, faTrashAlt);
Vue.component("fa", FontAwesomeIcon);
dom.watch();
示例8:
library.add(
faBars,
faUserCircle,
faPowerOff,
faCog,
faRocket,
faPlayCircle,
faGithub,
faMediumM,
faTwitter,
faInstagram,
faYoutube,
faPlus,
faEdit,
faTrash,
faTimes,
faCaretUp,
faCaretDown,
faExclamationTriangle,
faFilter,
faTasks,
faCheck,
faSquare,
faLanguage,
faPaintBrush,
faLightbulb,
faWindowMaximize,
faStream,
faBook
);
示例9: constructor
constructor(){
library.add(fas);
}
示例10:
import { DebugComponent } from './components/debug/debug.component'
import { EmptyComponent } from './components/empty/empty.component'
import { ErrorComponent } from './components/error/error.component'
import { FooterComponent } from './components/footer/footer.component'
import { LoaderComponent } from './components/loader/loader.component'
import { MainComponent } from './components/main/main.component'
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component'
import { SidebarComponent } from './components/sidebar/sidebar.component'
import { DocVersionPipe } from './pipes/doc-version.pipe'
import { EllipsisPipe } from './pipes/ellipsis.pipe'
import { RxDBService } from './rxdb/rxdb.service'
import { HelperService } from './services/helper.service'
import { CommonService } from './services/common.service'
import { DateFnsModule } from 'ngx-date-fns'
library.add(fas, far)
@NgModule({
imports: [
AngularCommonModule,
FileHelpersModule,
FontAwesomeModule,
FormsModule,
HttpClientModule,
NgbModule,
NgPipesModule,
ReactiveFormsModule,
RouterModule,
ToastrModule,
WebStorageModule,
DateFnsModule.forRoot()