Promise
    .promise
    .then(function(){
      console.log('Done from controller');
    });

  // Set a timeout for 3 seconds and reject
  $timeout(function(){
    $scope.buttonPromise.reject();
  }, 3000);
};
                  </pre>
                </div>
              </div>
            </div>
            <!-- /- end code sample -->

              <br>

            <!-- Scope Properties -->
            <h4>Scope Properties <small><a href="#scope">Available scope properties</a></small></h4>

           