diff --git a/modules/angular2/forms.js b/modules/angular2/forms.js index d33e0458ec..52e9ae5270 100644 --- a/modules/angular2/forms.js +++ b/modules/angular2/forms.js @@ -1,2 +1,2 @@ export * from './src/forms/model'; -export * from './src/forms/decorators'; +export * from './src/forms/directives'; diff --git a/modules/angular2/src/forms/decorators.js b/modules/angular2/src/forms/directives.js similarity index 92% rename from modules/angular2/src/forms/decorators.js rename to modules/angular2/src/forms/directives.js index 348e4aab27..c3ff69a0eb 100644 --- a/modules/angular2/src/forms/decorators.js +++ b/modules/angular2/src/forms/directives.js @@ -4,6 +4,11 @@ import {isBlank, isPresent} from 'angular2/src/facade/lang'; import {ListWrapper} from 'angular2/src/facade/collection'; import {ControlGroup, Control} from './model'; +class ControlGroupDirectiveBase { + addDirective(directive):void {} + findControl(name:string):Control { return null; } +} + export class ControlDirectiveBase { _groupDecorator:ControlGroupDirectiveBase; _el:NgElement; @@ -48,11 +53,6 @@ export class ControlDirectiveBase { } } -class ControlGroupDirectiveBase { - addDirective(c:ControlNameDirective):void {} - findControl(name:string):Control {} -} - @Decorator({ selector: '[control-name]', @@ -61,13 +61,9 @@ class ControlGroupDirectiveBase { } }) export class ControlNameDirective extends ControlDirectiveBase { - _groupDecorator:ControlGroupDirective; - _el:NgElement; - _controlName:String; - constructor(@Ancestor() groupDecorator:ControlGroupDirective, el:NgElement) { - super(groupDecorator, el); -} + super(groupDecorator, el); + } } @Decorator({ @@ -77,13 +73,9 @@ export class ControlNameDirective extends ControlDirectiveBase { } }) export class ControlDirective extends ControlDirectiveBase { - _groupDecorator:ControlGroupDirective; - _el:NgElement; - _controlName:String; - constructor(@Ancestor() groupDecorator:NewControlGroupDirective, el:NgElement) { - super(groupDecorator, el); -} + super(groupDecorator, el); + } } @Decorator({