-1

I keep getting the below error in my browser after I compile an Angular element that is using NGRX data:

enter image description here

I attempted adding and removing EntityCollectionServiceElementsFactory to the providers in every NgModule in the NGRX data app without any success (there are two modules).

I have a hypothesis that I need to add my entity NGRX services to the injector somehow, but I do not have an example on how to do so.

I have been messing with this for days now and I cannot figure it out.

My source code is below:

enter image description here

Here is an example of one of my NGRX data entity services:

enter image description here

Please help and thank you.

  • Can you show where your `EntityCollectionServiceElementsFactory` is provided? Additional it can be more productive to share a minimal reproduciable example in a Stackblitz – zerocewl Feb 29 '20 at 14:06
  • Turns out that angular elements inherit from their parent NgModule. Even though in the NGRX Data docs they tell you to add all store related modules to the app.module.ts, that will not work with an Angular element (unless all code related to your element is in the app module. – MTaylorModern Mar 02 '20 at 17:09

1 Answers1

0

enter image description here

Turns out that angular elements inherit from their parent NgModule. Even though in the NGRX Data docs they tell you to add all store related modules to the app.module.ts, that will not work with an Angular element if all of the element's code is in a separate NgModule (unless all code related to your element is in the app module.