Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Toggle text of button with ngClass in Angular

$
0
0

How would I change the text of a toggled class of a button in Angular, so far I have the following to toggle the class, I am using Bootstrap:

html

<!-- toggle button --> 
<button type="button" class="btn btn-primary mt-3 ml-3" (click)="status=!status;" [ngClass]="status ? 'btn-info' : 'btn-primary'"  [disabled]="clicked">Primary</button>
<!-- toggle button --> 

Any idea's?


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>