title: Angular entryComponents control from lazy loaded module
body: <p>I'm having two modules - one eagerly loaded which provides service and the component for modal displaying.</p>
  
  <p>The other one - lazy laoded module.</p>
  
  <p>My goal is to allow the lazy loaded module to call the following function:</p>
  
  <pre><code>this.modalService.open(UserAddFormComponent);
  </code></pre>
  
  <p>Which will appear in the for loop in the modal container component:</p>
  
  <pre><code>&lt;cc-generic-modal *ngFor="let modal of modals"
                    [component]="modal.component"&gt;
  &lt;/cc-generic-modal&gt;
  </code></pre>
  
  <p>And the cc-generic-modal codes is very similar to angular's provided: <a href="https://angular.io/guide/dynamic-component-loader" rel="nofollow noreferrer">https://angular.io/guide/dynamic-component-loader</a></p>
  
  <p>The problem I'm facing is connected with the entryComponents. When I'm trying to call the modal I'm getting an error saying that I need to provide the entry component in the entryComponents list. But the list in lazy loaded component is not passed in the component that displays the cc-generic-modal.</p>
  
  <p>If I were to add the UserAddFormComponent into the modal container component's entryComponenets list - the problem solves. But this solution does not fit me as the app will grow and this component can have over a hundred of entry componenets...</p>
  
  <p>Thank you in advance.</p>