Question and Answer-Checkbox
ng-click="isHidden = toggle value and assigned to isHidden use ng-show when -
by gogirl
HTML
<div ng-app ng-init="isHidden = '+'">
<button ng-click="isHidden = { '-': '+', '+':'-'}[isHidden]">
{{ isHidden }}
</button> What kind of problem are you trying to solve?
<h1 class="active" ng-show="isHidden == '-'" >
I hide when your - button is clicked
</h1>
</div>
CSS
.active {
background-color: green;
color: white;
}
JavaScript
//eval[isHidden] toggle value and assigned to isHidden
//if isHidden eq minus show answer
//ng-class evaluates the expression (in the square brackets) and then
// uses that as the key for the object; the value that the key relates
// to is the class that applies.