@@ -11,17 +11,17 @@ export class DynamicFormDirective implements OnInit {
1111 @Input ( ) model : any ;
1212 @Input ( ) lookups : object ;
1313
14- public formGroup : FormGroup ;
15- get changes ( ) { return this . formGroup . valueChanges ; }
16- get valid ( ) { return this . formGroup . valid ; }
17- get value ( ) { return this . formGroup . value ; }
18- get rawValue ( ) { return this . formGroup . getRawValue ( ) ; }
14+ public group : FormGroup ;
15+ get changes ( ) { return this . group . valueChanges ; }
16+ get valid ( ) { return this . group . valid ; }
17+ get value ( ) { return this . group . value ; }
18+ get rawValue ( ) { return this . group . getRawValue ( ) ; }
1919
2020 constructor (
2121 private componentFactoryResolver : ComponentFactoryResolver ,
2222 private container : ViewContainerRef ,
2323 @Inject ( LAYOUTS_TOKEN ) private layouts : LayoutDictionary ) {
24- this . formGroup = new FormGroup ( { } ) ;
24+ this . group = new FormGroup ( { } ) ;
2525 }
2626
2727 public ngOnInit ( ) : void {
@@ -31,7 +31,7 @@ export class DynamicFormDirective implements OnInit {
3131 const componentReference = this . layouts [ this . formConfig . layout ] ;
3232 const componentFactory = this . componentFactoryResolver . resolveComponentFactory < Layout > ( componentReference ) ;
3333 const component = this . container . createComponent ( componentFactory ) ;
34- component . instance . formGroup = this . formGroup ;
34+ component . instance . group = this . group ;
3535 component . instance . formConfig = this . formConfig ;
3636 component . instance . model = this . model ;
3737 }
0 commit comments