Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
How to toggle the color of multiple icons when we click on the icons in angular

I have 8 icons and I have to change the color to black from white when we click on the icon(It has to be toggle).

Note: At a time only one icon should be active (change the color).

.component.ts

<div class="container">
  <i class=" icon icon-face-1"></i>
 <i class=" icon icon-face-2"></i>
  <i class=" icon icon-face-3"></i>
  <i class=" icon  icon-face-4"></i>
<i class=" icon  icon-face-5"></i>
<i class=" icon  icon-face-6"></i>
<i class=" icon  icon-face-7"></i>
<i class=" icon  icon-face-8"></i>

</div>

I have tried but not able to do Can anyone help me on this
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You need to toggle the state of the icon, one way would be like on this example: https://stackblitz.com/edit/angular-font-awesome-starter-5z7mdg?file=src%2Fapp%2Fapp.component.html

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!