Angular Button Click Rotate Icon September 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 Can I Send A File To Mail In Html Form Using Http Request In Nodejs Server Code?Html Template + Json Vs Server HtmlEncode Non-ascii Characters To Html Using Javascript/windows Batch File Hybrid Share You may like these postsInput Loses Focus When Editing Value. Using NgFor And NgModel. Angular5"Can't Bind To 'ngFor' Since It Isn't A Known Native Property"Set My Chart Min Yaxis To 0Display Data In HTML Table With Multi Level Grouping Post a Comment for "Angular Button Click Rotate Icon"
Post a Comment for "Angular Button Click Rotate Icon"