Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

module

angular

Angular2 has an ability to generate forms dynamically (Model driven forms) as opposed to manually building the form (template driven).

I have a variation of Dynamic forms in which the entire Form generation functionality is exposed as a module (Angular RC5).

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

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

Here's the plunkr

Dynamic Form as a Module Plunkr

like image 786
user6123723 Avatar asked Aug 26 '16 19:08

user6123723


2 Answers

Had a similar error. Discovered it was caused by a repeated export in one of my index.ts file:

export * from './article/article.component';
export * from './body/body.component'; //first export
export * from './cards/cards.component';
export * from './body/body.component'; //repeated export
like image 82
Isaiahiroko Avatar answered Sep 21 '22 12:09

Isaiahiroko


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

like image 45
user6123723 Avatar answered Sep 17 '22 12:09

user6123723