I have grey color button and i need to implement it with 2 states one for selected (blue)and other for idle state(grey). I am working on Angularjs. I am new to this platform.
Please provide tutorial or sample code with output.
I have grey color button and i need to implement it with 2 states one for selected (blue)and other for idle state(grey). I am working on Angularjs. I am new to this platform.
Please provide tutorial or sample code with output.
You would probably give a class that you can add to your button, say "selected". Next would be flipping a variable for when this btn is selected:
$scope.isSelected = true;
Now use `ng-class on the button:
<button ng-class="{'selected':isSelected}"></button>
Basically, when isSelected is true, add class selected.
EDIT: Working fiddle conveying this implementation