title: AngularJs + typescript directives dependency injection
body: <p>I trie to implement a new directive in my app. Directive's code :</p>
  
  <pre><code>module Myapp.NV.Directives {
  
  export interface placeHolderScope extends ng.IScope {
      txt: string;
  }
  
  /**
  * PlaceHolder
  *
  *  @class
  *  @classdesc This directive is use to simulate placeholder HTML5 attributes
  */
  export class PlaceHolder implements IDirective {
      static $inject = ['$log','$timeout'];
      constructor($log: ng.ILogService, $timeout: ng.ITimeoutService) {
          var txt;
          var directive: any = {
              restrict: "A",
              scope: { txt: "@ngPlaceholder" },
              link: function (scope: placeHolderScope, elem: ng.IAugmentedJQuery, attrs: ng.IAttributes, $log: ng.ILogService, $timeout: ng.ITimeoutService) {
                  console.log($log);
                  console.log($timeout);
              }
          }
          return directive;
      }
  }
  }
  
   Myapp.NV.registerDirective('PlaceHolder', ['$log', '$timeout']);
  </code></pre>
  
  <p>My probleme is log and timeout are always undefined... </p>
  
  <pre><code>static $inject = ['$log','$timeout'];
  </code></pre>
  
  <p>Won't work...</p>
  
  <p>The code for registerDirective function :</p>
  
  <pre><code>export function registerDirective(className: string, services = []) {
      var directive = className[0].toLowerCase() + className.slice(1);
      services.push(() =&gt; new Myapp.NV.Directives[className]());
      angular.module('Myapp.NV.Directives').directive(directive, services);
  }
  </code></pre>
  
  <p>Thanks for help me :)</p>