@@ -4,6 +4,11 @@ import {isBlank, isPresent} from 'angular2/src/facade/lang';
44import { ListWrapper } from 'angular2/src/facade/collection' ;
55import { ControlGroup , Control } from './model' ;
66
7+ class ControlGroupDirectiveBase {
8+ addDirective ( directive ) :void { }
9+ findControl ( name :string ) :Control { return null ; }
10+ }
11+
712export class ControlDirectiveBase {
813 _groupDecorator :ControlGroupDirectiveBase ;
914 _el:NgElement ;
@@ -48,11 +53,6 @@ export class ControlDirectiveBase {
4853 }
4954}
5055
51- class ControlGroupDirectiveBase {
52- addDirective ( c :ControlNameDirective ) :void { }
53- findControl ( name :string ) :Control { }
54- }
55-
5656
5757@Decorator ( {
5858 selector : '[control-name]' ,
@@ -61,13 +61,9 @@ class ControlGroupDirectiveBase {
6161 }
6262} )
6363export class ControlNameDirective extends ControlDirectiveBase {
64- _groupDecorator :ControlGroupDirective ;
65- _el :NgElement ;
66- _controlName :String ;
67-
6864 constructor ( @Ancestor ( ) groupDecorator :ControlGroupDirective , el :NgElement ) {
69- super ( groupDecorator , el ) ;
70- }
65+ super ( groupDecorator , el ) ;
66+ }
7167}
7268
7369@Decorator ( {
@@ -77,13 +73,9 @@ export class ControlNameDirective extends ControlDirectiveBase {
7773 }
7874} )
7975export class ControlDirective extends ControlDirectiveBase {
80- _groupDecorator :ControlGroupDirective ;
81- _el :NgElement ;
82- _controlName :String ;
83-
8476 constructor ( @Ancestor ( ) groupDecorator :NewControlGroupDirective , el :NgElement ) {
85- super ( groupDecorator , el ) ;
86- }
77+ super ( groupDecorator , el ) ;
78+ }
8779}
8880
8981@Decorator ( {
0 commit comments