Angular Button Click Rotate Icon December 26, 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 JugaWhatsapp://send?text Cut String From '&' Character Till End?Is It Possible To Import An Html File As A String With Typescript?How To Render A Raw Html On Angular Share You may like these postsHow To Fix A Div HeightCSS Set Attribute To Element But Not To DescendantsText Over Image Using Jquery And CssBootstrap 3.2 Vertical Align Image Next To Text Without Knowing Height Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"