Angular Button Click Rotate Icon February 23, 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 Align Pseudo Element :before :after And Span ElementHow To Check If An Html5 Validation Was Triggered Using Selenium?Jquery Datepicker Getting Displayed At The Bottom Of The Page (keith-wood Datepicker) Share You may like these postsCss Transitions Don't Update The Hover StateDynamic Height For Popups Depending On Content, Is It Possible?Sticky Flexible Footers And Headers Css Working Fine In Webkit, But Not In GeckoJavascript String Undefined Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"