An warware: font madalla angular

Tabbas, ga dogon labarin game da Font Awesome Angular:

Font Awesome babban ษ—akin karatu ne na icon wanda za'a iya amfani dashi a cikin aikace-aikacen mu na Angular. Haษ—a Font Awesome yana ba masu haษ“aka damar zuwa ษ—aruruwan madaidaitan gumaka masu ฦ™ima waษ—anda za a iya keษ“ance su da CSS. Wannan yana da amfani musamman tunda yana ba mu damar amfani da gumaka masu kyau ba tare da buฦ™atar dogaro da yawa akan zane-zane ko fayilolin hoto ba. Wannan na iya sauฦ™aฦ™a da gaske kulawa da tsara ayyukan ku na Angular. A cikin wannan jagorar, za mu koyi yadda ake haษ—a Font Awesome cikin aikace-aikacen ku na Angular mataki-mataki.

Matsala da Magani:

A wasu lokuta a matsayinka na mai haษ“akawa, ฦ™ila ka sami wahalar yin ma'amala da adadi mai yawa na hotuna da zane-zane lokacin da ake mu'amala da gumaka a cikin aikinku. Wannan ba wai kawai zai iya sa aikin ku ya lalace ba amma kuma yana iya shafar aikin ฦ™a'idar ku. Wannan shine inda Font Awesome ke shigowa.

Font Awesome yana sauฦ™aฦ™e wannan ta hanyar ba da faffadan gumaka da aka adana azaman fayil ษ—in rubutu.

// First you will need to install the font awesome library
npm i @fortawesome/angular-fontawesome @fortawesome/fontawesome-svg-core @fortawesome/free-solid-svg-icons

// Next, import the fontawesome library in your app.module.ts file
import {FontAwesomeModule} from '@fortawesome/angular-fontawesome';

Bayanin Code:

Kawai gudanar da npm shigar da umarni don fakitin Font Awesome a cikin tashar ku ko umarni da sauri don shigar da su a cikin aikin Angular ku.

Bayan an gama shigarwar, dole ne ka shigo da 'FontAwesomeModule' a cikin fayil ษ—in app.module.ts na aikin Angular ku.

Haษ—in kai Tare da Abubuwan Angular:

Mataki na gaba shine sanin kanku da yadda ake amfani da waษ—annan gumakan a cikin abubuwan haษ—in ku.

// Here's how to use the icons in your Angular component
import {faCoffee} from '@fortawesome/free-solid-svg-icons';

export class AppComponent {
faCoffee = faCoffee;
}

Bayan shigo da gunkin, zaku iya amfani da shi a cikin abubuwan haษ—in ku kawai ta ฦ™ara lambar mai zuwa a cikin fayil ษ—in HTML ษ—inku.

<fa-icon &#91;icon&#93;="faCoffee"></fa-icon>

Amfani da ฦ˜arin Gumaka:

Akwai wasu fakiti da yawa daga Font Awesome waษ—anda zaku iya amfani da su don samun ฦ™arin gumaka.

npm i @fortawesome/free-brands-svg-icons @fortawesome/free-regular-svg-icons

Bayan shigar, zaku iya amfani da sabbin gumaka ta shigo da su cikin fayil ษ—in bangaren.

[b] A ฦ™arshe [/b], Font Awesome kayan aiki ne mai ban mamaki wanda zai iya haษ“aka abubuwan gani na aikace-aikacen ku na Angular. Yana da sauฦ™in amfani kuma yana ba da fa'idodi masu yawa akan amfani da hotuna ko zane-zane na gargajiya. Ko kai ฦ™wararren mai haษ“akawa ne ko kuma fara farawa da Angular, tabbas yakamata kuyi la'akari da haษ—a Font Awesome a cikin ayyukanku.

  • Yana da sauฦ™in sarrafawa fiye da tarin hotuna
  • Yana ba da babban tarin gumaka
  • Yana taimakawa tare da aikin gidan yanar gizon
  • Yana bayar da scalability ba tare da asarar inganci ba
  • Yana ba da ikon CSS akan gumaka
Shafi posts:

Leave a Comment