I am trying to toggle a div text on click of a button. I tried taking a scope variable and toggeling classname based on the variable. Where am I making the mistake here
You can simplify this a lot like so
test hello test
Fiddle example
Unless you need the specific ng-class to toggle in which case you can do something like
(just make sure you're using a newer version of angular for this)