I would like to change the background colour of a button when it is clicked
HTML code:
<div class="btn-group">
<button type="button" class="btn btn-default" ng-click="style1()">
Celsius
</button>
<button type="button" class="btn btn-default" ng-click="style2()">
Fahrenheit
</button>
</div>
Angular code where the background colours of the buttons should be changed:
$scope.style
{
};
$scope.style2
{
}
See Question&Answers more detail:os