title: using defer in typescript
body: <p>I am having issues using $q.defer in my typescript controller. The error I get is this.$q.defer is not a function. This is my typescript....</p>
  
  <pre><code>export class AccountWizardController implements IAccountWizardScope {
  
    account: Account;
  
    static $inject = ['$q']
    constructor(private $q: ng.IQService) {
    }
  
    saveState(): ng.IPromise&lt;Account&gt; {
      console.log(this.$q);
      var deferred = this.$q.defer&lt;Account&gt;();
      console.log(deferred);
      return deferred.promise;
    }
  }
  
  export interface IAccountWizardScope {
    account: ContractMonitor.Models.Account;
    saveState(): ng.IPromise&lt;Account&gt;;
  }
  </code></pre>
  
  <p>When I call the saveState() method in the view I get the error. This has me completely baffled.</p>
  
  <p>Thanks.</p>