I want to change color of the button using angular Js while clicking the button for first click it should change color and for second click it should go to default color and repeat it
<script>
function setColor(btn, color){
var count=2;
var property = document.getElementById(btn);
if (count == 0){
property.style.backgroundColor = "#FFFFFF"
count=1;
}
else{
property.style.backgroundColor = "#A9A9A9"
count=0;
}
}
</script>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<input type="button" id="button" value = "button" onclick="setColor('button', '#101010')";/>
</body>
</html>