I'm working with Angular and I have a question: How can I make this icon rotate when I click on it?
<div class="col-lg-1 col-md-4 col-sm-2 col-2 alend-text">
<i class="pomrgto iconfa fas fa-chevron-circle-right view_cir" title="Ver" aria-hidden="true" (click)="isCollapsed = !isCollapsed"
[attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic"></i>
</div>
The icon has the
pomrgto iconfa fas fa-chevron-circle-right view_cir
class, and I want it to behave like this:
https://i.sstatic.net/1QXHz.png
When I click the icon, I'd like it to rotate 90 degrees to the right in a smooth animation. Clicking again should return it to its original position.
https://i.sstatic.net/WSRo0.png
I know CSS can achieve this effect, but could you provide some guidance on how I can implement it?
Thank you!