DirectiveFactory

export interface DirectiveFactory

exported from angular2/core defined in angular2/src/core/metadata.ts (line 105)

DirectiveMetadata factory for creating annotations, decorators or DSL.

Example as TypeScript Decorator

@Directive({selector: 'input'}) class InputDirective { constructor() { // Add some logic. } }

Example as ES5 DSL

var MyDirective = ng .Directive({...}) .Class({ constructor: function() { ... } })

Example as ES5 annotation

var MyDirective = function() {
  ...
};

MyDirective.annotations = [
  new ng.Directive({...})
]