In my angular application I have 10 icons and my requirement is to change the color from white to red when we click on the one icon among the 10 icons. And if we click on another icon it will turned to red ,and previous color changed icon(red) will be turned to white.
my code is
dashboard.component.html
<div class="container">
<i class=" icon icon-smiley-face-1"></i>
<i class=" icon icon-smiley-face-2"></i>
<i class=" icon icon-smiley-face-3"></i>
<i class=" icon icon-smiley-face-4"></i>
<i class=" icon icon-smiley-face-5"></i>
<i class=" icon icon-smiley-face-6"></i>
</div>
Like the above I have 10 icons among the 10 icons if I click on one it will turned to red and at a time only one icon color has to change.
I know to change the one icon color but multiple icons I am unable to can anyone help me on this