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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…