Angular Button Click Rotate Icon June 10, 2024 Post a Comment I have the following button Solution 1: You can add a flag in your component as follows:@Component({ ... template: ` <button class="btn btn-primary btn-sm" [ngClass]="{'clicked': isClicked}" type="button" (click)="executeUsecase(usecase.UsecaseId)">> <i class="fa fa-play"></i> </button> ` }) exportclassComponent { ... isClicked: false; executeUsecase(id) { ... this.isClicked = true; } } Copycss: .btn { transition: all 2s ease-out !important; } .clicked { transform: rotate(20deg) } CopyBaca JugaI Can't Get My Font-awesome Icons To Show Up. Tried Importing Css With Multiple MethodsHow To Create Checkbox Looks Like Font-awesome GlyphiconTooltip Not Displaying On Fontawesome Icon Button Share You may like these postsHow To Display A Certain Html If A Condition Is Never Met (angular)Js : Wrong Redirection With A SliderHtml2canvas In Angular 4Call Typescript Function In Html Without A Click Event Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"