浏览代码

Further AOT fixes

Richard Knight 6 年之前
父节点
当前提交
c18c71b47a
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 2 1
      src/app/dynaform/directives/dynafield.directive.ts
  2. 1 0
      src/app/dynaform/dynaform.module.ts

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

@@ -10,7 +10,8 @@ import {
 	NG_ASYNC_VALIDATORS, AsyncValidatorFn
 } from '@angular/forms';
 
-import * as formFieldComponents from './../components';
+import { ffcArr } from './../components';
+const formFieldComponents = ffcArr.reduce((acc, componentClass) => ({ ...acc, [componentClass.name]: componentClass }), {});
 
 interface IFFC {
 	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 { ffcArr } from './components'; // ffcArr = Form Field Components Array, exported from components/index.ts
+console.log(ffcArr);
 
 @NgModule({
 	imports: [