Error: An unexpected value of 'undefined' is exported by the 'DynamicFormModule' module

Angular2 has the ability to dynamically generate forms (forms controlled by a model), rather than manually create a form (template-driven).

I have a variation of dynamic forms in which all the functionality of generating a form is displayed as a module (Angular RC5).

But it breaks with the following error (appears in the Dev console)

VM849:20 Error: Error: Unexpected value 'undefined' exported by the module 'DynamicFormModule' 

Here plunkr

Dynamic form as a Plunkr module

+7
module angular
source share
3 answers

Fixed. There was a typo for DynamicFormComponent. It was recorded as DynamicForm. Fixed in dynamic-form.module.ts

+3
source share

There was a similar error. It was discovered that this was caused by re-exporting to one of my index.ts files:

 export * from './article/article.component'; export * from './body/body.component'; //first export export * from './cards/cards.component'; export * from './body/body.component'; //repeated export 
+1
source share

I had the same error. I fixed it by replacing

 export * from './myComponent' 

by

 export {MyComponent} from './myComponent' 
0
source share

All Articles