title: Making a toggle ng-click event
body: <p>I have been able to create a function to successfully toggle the rows in my ng-table to expand on click, however, when clicking them again they will not hide. The function in the javascript is:  </p>
  
  <pre><code>$scope.toggle = function() {
      return !this.booleanVal;
  }; 
  </code></pre>
  
  <p>The <code>booleanVal</code> is being a value from the <code>json</code> file (each row with its own value). Then in the HTML.</p>
  
  <pre><code>&lt;p class="row_description more" ng-click="row.booleanVal = toggle()"&gt;{{row.description}&lt;/p&gt;
  &lt;div class="check-element animate-show" ng-show="row.booleanVal"&gt;
  </code></pre>
  
  <p>It works for the first click, turning the previously false <code>booleanVal</code> to <code>true</code>, however, it doesn't <code>toggle</code> back to <code>false</code>. Any idea what's going wrong?</p>