
p.location-badge.
  exported from <a href='../core'>angular2/core</a>
  defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.37/modules/angular2/src/core/metadata.ts#L97-L148">angular2/src/core/metadata.ts (line 97)</a>

:markdown
  <a href='DirectiveMetadata-class.html'><code>DirectiveMetadata</code></a> factory for creating annotations, decorators or DSL.
  
  ## Example as TypeScript Decorator
  
  ```
  import {Directive} from "angular2/angular2";
  
  @Directive({...})
  class MyDirective {
    constructor() {
      ...
    }
  }
  ```
  
  ## Example as ES5 DSL
  
  ```
  var MyDirective = ng
    .Directive({...})
    .Class({
      constructor: function() {
        ...
      }
    })
  ```
  
  ## Example as ES5 annotation
  
  ```
  var MyDirective = function() {
    ...
  };
  
  MyDirective.annotations = [
    new ng.Directive({...})
  ]
  ```
  
  
