All Projects → seiyria → ng2-fontawesome

seiyria / ng2-fontawesome

Licence: MIT license
An easy-to-use directive for font awesome icons.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ng2-fontawesome

Ng2 Konva
Angular & Canvas - JavaScript library for drawing complex canvas graphics using Angular.
Stars: ✭ 78 (+290%)
Mutual labels:  angular2, ng2
Ngx Date Fns
⏳ date-fns pipes for Angular 2.0 and above ⏳
Stars: ✭ 135 (+575%)
Mutual labels:  angular2, ng2
Angular Full Stack
Angular Full Stack project built using Angular, Express, Mongoose and Node. Whole stack in TypeScript.
Stars: ✭ 1,261 (+6205%)
Mutual labels:  angular2, font-awesome
Ng2 Sweetalert2
A sweetalert2 service for angular2.
Stars: ✭ 49 (+145%)
Mutual labels:  angular2, ng2
Truly Ui
Truly-UI - Web Angular UI Components for Desktop Applications (Electron, NW, APP JS)
Stars: ✭ 195 (+875%)
Mutual labels:  angular2, ng2
Ngautocomplete
Light-weight autocomplete component for Angular.
Stars: ✭ 52 (+160%)
Mutual labels:  angular2, ng2
Ng2 Smart Table
Angular Smart Data Table component
Stars: ✭ 1,590 (+7850%)
Mutual labels:  angular2, ng2
Ngx Admin
Customizable admin dashboard template based on Angular 10+
Stars: ✭ 23,286 (+116330%)
Mutual labels:  angular2, ng2
Ng2 Nouislider
Angular2 noUiSlider directive
Stars: ✭ 181 (+805%)
Mutual labels:  angular2, ng2
Angular Google Maps
Angular 2+ Google Maps Components
Stars: ✭ 1,982 (+9810%)
Mutual labels:  angular2, ng2
Ng2 Ace
A basic ace editor directive for angular 2.
Stars: ✭ 33 (+65%)
Mutual labels:  angular2, ng2
ng-data-picker
🏄🏼 A data picker based on Angular 4+ (like native datetime picker of iOS)
Stars: ✭ 24 (+20%)
Mutual labels:  angular2, ng2
Angular2 Carousel
An lightweight , touchable and responsive library to create a carousel for angular 2 / 4 / 5
Stars: ✭ 26 (+30%)
Mutual labels:  angular2, ng2
Ng2 Breadcrumbs
A breadcrumb service for the Angular 7 router
Stars: ✭ 61 (+205%)
Mutual labels:  angular2, ng2
Ngx Echarts
An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
Stars: ✭ 820 (+4000%)
Mutual labels:  angular2, ng2
Springbootangularhtml5
♨️ Spring Boot 2 + Angular 11 + HTML5 router mode + HTTP interceptor + Lazy loaded modules
Stars: ✭ 89 (+345%)
Mutual labels:  angular2, font-awesome
Angular
UI-Router for Angular: State-based routing for Angular (v2+)
Stars: ✭ 287 (+1335%)
Mutual labels:  angular2, ng2
Cc
一个基于angular5.0.0+ng-bootstrap1.0.0-beta.8+bootstrap4.0.0-beta.2+scss的后台管理系统界面(没基础的同学请先自学基础,谢谢!)
Stars: ✭ 416 (+1980%)
Mutual labels:  angular2, ng2
Ng2 Search Filter
Angular 2 / Angular 4 / Angular 5 custom pipe npm module to make a search filter on any input, 🔥 100K+ downloads
Stars: ✭ 137 (+585%)
Mutual labels:  angular2, ng2
angular2-signature-pad
Signature pad component for Angular 2.x and above.
Stars: ✭ 17 (-15%)
Mutual labels:  angular2, ng2

ng2-fontawesome

An easy-to-use directive for font awesome icons.

Install

npm i -s ng2-fontawesome

Usage

First, make sure you have a CSS and font loader set up for webpack, like so:

{
  test: /\.css/,
  loader: 'style!css'
},
{
  test: /\.woff|\.woff2|\.svg|.eot|\.ttf/,
  loader: 'file'
},

It is recommended that you globally apply the Font Awesome directive like so:

import { provide, PLATFORM_DIRECTIVES } from '@angular/core';
import { FontAwesomeDirective } from 'ng2-fontawesome';
import { bootstrap } from '@angular/platform-browser-dynamic';

bootstrap(MyAppComponent, [
  provide(PLATFORM_DIRECTIVES, { useValue: FontAwesomeDirective, multi: true })
]);

Doing so will allow you to use the fa directive anyhwere. Supposing you don't want to do that, registering it and including it like normal will work as well.

Here is how you would use it in your templates:

<i fa [icon]="'cog'" [fw]="true"></i>

Options

Name Valid Values
icon Any font awesome icon name
fw true, false
size 'lg', '2x', '3x', '4x', '5x'
spin true, false
pulse true, false
rotate '90', '180', '270'
flip 'vertical', 'horizontal'
extra any other classes you want to attach to this icon
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].