angularmodule

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


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


Solution

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