Browse Source

Further AOT fixes

Richard Knight 6 years ago
parent
commit
c18c71b47a

+ 2 - 1
src/app/dynaform/directives/dynafield.directive.ts

@@ -10,7 +10,8 @@ import {
 	NG_ASYNC_VALIDATORS, AsyncValidatorFn
 	NG_ASYNC_VALIDATORS, AsyncValidatorFn
 } from '@angular/forms';
 } from '@angular/forms';
 
 
-import * as formFieldComponents from './../components';
+import { ffcArr } from './../components';
+const formFieldComponents = ffcArr.reduce((acc, componentClass) => ({ ...acc, [componentClass.name]: componentClass }), {});
 
 
 interface IFFC {
 interface IFFC {
 	control: FormControl; // Remember, this can be an individual FormControl or a FormGroup
 	control: FormControl; // Remember, this can be an individual FormControl or a FormGroup

+ 1 - 0
src/app/dynaform/dynaform.module.ts

@@ -13,6 +13,7 @@ import { ModelMapperService } from './services/model-mapper.service';
 import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
 import { DateInputsModule } from '@progress/kendo-angular-dateinputs';
 
 
 import { ffcArr } from './components'; // ffcArr = Form Field Components Array, exported from components/index.ts
 import { ffcArr } from './components'; // ffcArr = Form Field Components Array, exported from components/index.ts
+console.log(ffcArr);
 
 
 @NgModule({
 @NgModule({
 	imports: [
 	imports: [