title: TypeError: $timeout is not a function
body: <p>What is happening here:</p>
  
  <p>I want the "cancel reservation" button to have a timeout on it after its clicked. On first click it changes to show "confirm cancellation" button. After a few seconds it return back to "cancel reservation". </p>
  
  <p>My console gives me:</p>
  
  <pre><code>TypeError: $timeout is not a function
  </code></pre>
  
  <p>I am using AngularJS $timeout:</p>
  
  <p>controller:</p>
  
  <pre><code>'use strict';
  
  module.controller('ReservationItemCtrl', ['$scope', '$stateParams', '$RPC',
      function($scope, $stateParams, $RPC, $timeout) {
  
  
   ......other stuff.......
   ......other stuff.......
  
      $scope.toggleCancelReservation = function(reservation) {
          reservation.clickedcancel = true;
          $timeout(function(){reservation.clickedcancel = false}, 4000);
      };
  }
  ]);
  </code></pre>
  
  <p>template:</p>
  
  <pre><code>  &lt;button ng-show="!reservation.value.deleted &amp;&amp; !deleted.value"
            class="btn btn-danger" 
            ng-show="canCancel(reservation)" ng-if="!reservation.clickedcancel" ng-click="toggleCancelReservation(reservation)"&gt;
      Cancel With Refund
    &lt;/button&gt;
    &lt;button type="button" class="btn btn-danger" ng-if="reservation.clickedcancel == true" ng-click="deleteReservation();" style="margin-top: -4px;"&gt;
      Confirm Cancellation
    &lt;/button&gt;
  </code></pre>
  
  <p>I am accurately getting the button to switch when first clicked and then if clicked again it correctly cancels/deletes the reservation but if I don't do anything after the first click the timeout never returns it back to the original button. In my console I see that <code>$timeout is not a function</code> for some reason? I have it included in my controller. Am I missing something?</p>