Angular Button Click Rotate Icon April 14, 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 JugaDoes Negative Z-index Affect Performance Or Compatibility?Chrome Bug Or Coding Error? Anchor/id Links Within Destination Page Not WorkingOverlap Columns In Bootstrap 4 Share You may like these postsTwiiter Bootstrap (button Dropdown) + Div FixedCss Loads Animations On Multiple Lines At The Same TimeHow To Change The Button Text On Click For A Short Duration Only Using Javascript?Checkbox Onchange In Inside Disabled Not Firing In Firefox With React Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"