I have been getting interested in Angular recently and I was trying it out but having a little bit of a difficulty.
I have this JavaScript function:
function toggle(target) {
var curVal = document.getElementById(target).style.visibility;
document.getElementById(target).style.visibility = (curVal === 'visible') ? 'hidden' : 'visible';
};
It changes the value between visible and hiddenon each click of the following button:
<button class="btn-info" onclick="toggle('theBox')" type="button">Toggle Box</button>
I am trying to do this same thing in Angular, just not sure how, as far as I understand Angular is the same as JavaScript in terms of the functions.. I just don't understand how to do this same operation using Angular.