Angular Button Click Rotate Icon August 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 JugaHow To Unable Button If Textbox Suddenly Have ValuesHow To Insert A Shortcode To An Existing Html Elements (wordpress)?Only First Word In A Multi Word Variable Is Being Displayed Share You may like these postsVertical Align Text After Font IconUse Fontawesome Icon Inside A ::before Pseudo Element With Attr()How To Put The Number At Top Right Corner Of Cart Icon?Stop Text From Wrapping Under An Icon Inside An Anchor Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"