Angular Button Click Rotate Icon September 30, 2023 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 JugaVertically Center Parent Div On PageThree Inputs In A Row - Bootstrap 3Increase Or Grow A Div Tag Width From Right To Left Share You may like these postsPictures With Patterns Sometimes Display StrangelyHow Can I Set An Attribute With Case-sensitive Name In A Javascript Generated ElementCan't Get Input Radio Selected ValueValidation Error: Byte-order Mark Found In Utf-8 File Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"