export function FormFieldDirectiveFactory() { return new FormFieldDirective(); } class FormFieldDirective { restrict = 'E'; template = require('./FormField.html'); require = "^form"; replace = true; transclude = true; scope = { name: "@" } link(scope: FormFieldScope, element: JQuery, attributes: ng.IAttributes, form: ng.IFormController) { scope.form = form; } } interface FormFieldScope extends angular.IScope { form: angular.IFormController; }