title: change the text of the button on click using angular JS
body: <p>How I can change the text of the button on click of the button.</p>
  
  <p>Here it is what I have tried.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;button ng-click="toggle = !toggle"&gt;Toggle!&lt;/button&gt;
  &lt;div class="box on" ng-show="toggle" ng-animate="'box'"&gt;On&lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function MainController($scope) {
    $scope.toggle = true;
  }
  </code></pre>