Angular Button Click Rotate Icon June 09, 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 JugaSafari 6 (ios 6) Flex Layout Doesn't Wrap ElementsI Am Trying All The Selected Arrays To Change The Style Angular 4Is There A Way Of Accessing Html Tag Attribute In Css Within Shadow-dom? Share You may like these postsJavascript Es6 - Count Duplicates To An Array Of ObjectsAngular 4 Output Complete Html Syntax Code In Html As Raw TextListen To Custom Dom Events In AngularDisable Touch On The Pseudo Content Of An Element Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"