title: How to change the color of a button for only a few seconds using angular?
body: <p>I want my button to change color when clicked. Also only change it for 3 seconds and then go back to the default color. I have been looking at similar questions postet on stack overflow but whatever I tried it didn't work (don't know why my code isn't working). Also Im not sure how to make it change the color for only 3 seconds.
  So far I
  1.  $scope.isActive=false;
  2. then in the controller, I changed it to true if clicked:</p>
  
  <pre><code>$scope.copyText = function(text){
    $scope.isActive = !$scope.isActive;
    console.log('clicked in controller');
    Clipboard.copy(text)
  }
  </code></pre>
  
  <p><strong>html:</strong></p>
  
  <pre><code>&lt;div class="inner-single" ng-hide="updateInfo"&gt;
      &lt;h3&gt;Login Details:&lt;/h3&gt;
      &lt;h5 &gt;&lt;span class="categories"&gt;Username:&lt;/span&gt; {{account.username}}&lt;button 
           ng-click="copyText(account.username)" ng-class="isActive ? 'noColor' : 'hasColor'" &gt;
      Copy&lt;/button&gt;&lt;/h5&gt;    
    &lt;button class="btn btn-large btn-default" ng-click="showForm()"&gt;Update Info&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>CSS</strong></p>
  
  <pre><code> .copy-button {
    .copy-button.hasColor {
      color:green;
    }
    .copy-button.noColor {
     color: grey; }
    font-size: 12px;
    padding: 0px, 3px, 0px, 3px;
    margin-left: 5px; }
  }
  </code></pre>
  
  <p>For keeping track of the seconds, I would use the setTimeout function, however, not sure how to combine it with angular and changing the color..</p>
  
  <p>Happy about suggestions!
  Thank you!</p>