Angular Button Click Rotate Icon April 21, 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 JugaHow To Set Flex Items To Equal Width According To The Item With The Longest Content?Portfolio Gallery With Filtering CategoriesHow To Remove Gaps In Flexbox? Share You may like these postsModifying "value" Attribute Of "text" Input Not Working Using JavascriptHow To Validate If The E-mail Address Is Existing In Ymail,gmail,etc.?Iframe Allowfullscreen Not Working In Ie11 , Works For Youtube Video Not For Other Site SrcJquery Count Number Of Divs With A Certain Class? Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"