0

In upgrading from Angular 6 to 7 everything seemed fine except when I output to aot. I can successfully create a build with the cli and one of my lazy loaded modules works and other does not in that it gets a very weird exception.

ctor error

Putting a breakpoint in this allowed me to find that an array is being passed into the module factory instead of a constructor. This is what is breaking in aot. The culprit is shown below 5 dependencies in array

However, I cannot figure out how these 5 declarations are being injected, they should only be injected with the ReactiveFormsModule, not on their own. I've simply added them and exported them in a lazy loaded module and they work fine in JIT. Anyone experience a similar issue or find a solution? Code snippet example will follow soon - as I have to reproduce it in public project.

Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83
evanjmg
  • 3,465
  • 1
  • 14
  • 12

0 Answers0