<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x ] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[x ] bug report =&gt; search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
When trying to render nested dynamic components via the ComponentFactoryResolver I receive an exception/error message:</p>
<p dir="auto">browser_adapter.js:84Error: Expression has changed after it was checked. Previous value: 'CD_INIT_VALUE'. Current value: 'null'. It seems like the view has been created after its parent and its children have been dirty checked. Has it been created in a change detection hook ?</p>
<p dir="auto"><strong>Expected/desired behavior</strong><br>
It should render the nested dynamic controls. This had worked until the introduction of the ComponentFactoryResolver.</p>
<p dir="auto"><strong>Reproduction of the problem</strong><br>
Here is the plunkr recreating the issue: <a href="http://plnkr.co/edit/BfqEYqNqyZuJDytt1DCc?p=preview" rel="nofollow">http://plnkr.co/edit/BfqEYqNqyZuJDytt1DCc?p=preview</a></p>
<p dir="auto">It's a duplicate of <a href="url">https://github.com/angular/angular/issues/10762</a> except that the solution provided does not work for ViewChildren, it only works for ViewChild.</p>
<p dir="auto"><strong>What is the expected behavior?</strong><br>
I should be able to render a control via ComponentFactoryResolver which in turn also renders multiple controls via ComponentFactoryResolver.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong></p>
<p dir="auto">It used to work.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong></p>
<ul dir="auto">
<li><strong>Angular version:</strong> 2.0.0-rc.5</li>
<li><strong>Browser:</strong> [all]</li>
<li><strong>Language:</strong> [all]</li>
</ul>
<p dir="auto"><strong>I'm submitting a ...</strong>  (check one with "x")</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ ] bug report =&gt; search github for a similar issue or PR before submitting
[X] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question"><pre class="notranslate"><code class="notranslate">[ ] bug report =&gt; search github for a similar issue or PR before submitting
[X] feature request
[ ] support request =&gt; Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
</code></pre></div>
<p dir="auto">Follow-up issue for <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="182795157" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/12275" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/12275/hovercard" href="https://github.com/angular/angular/issues/12275">#12275</a> as requested by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/DzmitryShylovich/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/DzmitryShylovich">@DzmitryShylovich</a></p>
<p dir="auto"><strong>Current behavior</strong><br>
<code class="notranslate">entryComponents</code> of a lazy loaded NgModule cannot be rendered using <code class="notranslate">ComponentFactoryResolver</code>. Error message: <code class="notranslate">No component factory found for {{entryComponent}}</code></p>
<p dir="auto"><strong>Expected behavior</strong><br>
<code class="notranslate">entryComponents</code> should be available just like if the module is imported</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
<a href="http://plnkr.co/edit/9euisYeSNbEFrfzOhhzf?p=preview" rel="nofollow">http://plnkr.co/edit/9euisYeSNbEFrfzOhhzf?p=preview</a></p>
<p dir="auto">I created a simple setup, similar to what we use internally. <code class="notranslate">Main</code> component provides a method to render a <code class="notranslate">Type</code>. <code class="notranslate">EntryComponent</code> is declared as <code class="notranslate">entryComponent</code> in <code class="notranslate">Page1Module</code>. However after having loaded <code class="notranslate">Page1Module</code>, when trying to render <code class="notranslate">EntryComponent</code> via <code class="notranslate">ComponentFactoryResolver</code>,  <code class="notranslate">No component factory found for EntryComponent</code> is thrown.</p>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
Render <code class="notranslate">entryComponents</code> of child modules at root level. Use cases for this approach are</p>
<ul dir="auto">
<li>Modals that shall be rendered on top of everything</li>
<li>Notifications</li>
<li>etc.</li>
</ul>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
We're using currently Angular 2.1.1 but this affects the latest version of Angular (2.4.6) as well (see plnkr).</p>
<ul dir="auto">
<li><strong>Language:</strong> TypeScript ^2.0.0</li>
</ul>