<p dir="auto"><strong>I'm submitting a ...</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[x] bug report
[ ] feature request
[ ] support request"><pre class="notranslate"><code class="notranslate">[x] bug report
[ ] feature request
[ ] support request
</code></pre></div>
<p dir="auto"><strong>Current behavior</strong><br>
The parent component generates a component based on the supplied component metadata. The lifecycle hooks of the generated component which in turn the generated child component also generates another component is not fired/called.</p>
<p dir="auto"><strong>Expected behavior</strong><br>
The lifecycle hooks defined in the nested generated components should be fired.</p>
<p dir="auto"><strong>Minimal reproduction of the problem with instructions</strong><br>
Reproduction Link: <a href="http://plnkr.co/edit/wRfKN5wynVC3LZKDVw1s?p=preview" rel="nofollow">http://plnkr.co/edit/wRfKN5wynVC3LZKDVw1s?p=preview</a></p>
<p dir="auto">The output should be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hello Angular2

Parent
Child
Foo"><pre class="notranslate"><code class="notranslate">Hello Angular2

Parent
Child
Foo
</code></pre></div>
<p dir="auto">The current behavior is:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hello Angular2

Parent
Child"><pre class="notranslate"><code class="notranslate">Hello Angular2

Parent
Child
</code></pre></div>
<p dir="auto"><strong>What is the motivation / use case for changing the behavior?</strong><br>
I have different kinds of modals (chart, alert, pdf viewer). One of them is a modal that displays any kind of chart like line chart, bar chart etc. So basically the parent acts as a modal component factory, the child is the chart modal which in turn dynamically creates charts based on the supplied component metadata.</p>
<p dir="auto"><strong>Please tell us about your environment:</strong><br>
Operating System: macOS 10.12.2<br>
Package Manager: Yarn 0.18.1<br>
Angular CLI: 1.0.0-beta.26</p>
<ul dir="auto">
<li>
<p dir="auto"><strong>Angular version:</strong> 2.4.4</p>
</li>
<li>
<p dir="auto"><strong>Browser:</strong> Chrome 55.0.2883.95, Firefox 50.1.0. Haven't tested on others</p>
</li>
<li>
<p dir="auto"><strong>Language:</strong> TypeScript 2.0.10</p>
</li>
<li>
<p dir="auto"><strong>Node (for AoT issues):</strong> <code class="notranslate">node --version</code> =  6.9.2</p>
</li>
</ul>
<p dir="auto">components loaded with the dynamic component loader are not having their lifecycle events called. this was a attempted workaround where these same events were not called using a route. both of these situations involve angular 2 running inside of an electron application. we need the lifecycle hooks, especially ngOnInit. here is a plunker which reproduces the dcl behaviour</p>
<p dir="auto"><a href="http://plnkr.co/edit/XXLWqxwywGoFZaX1w99I?p=preview" rel="nofollow">http://plnkr.co/edit/XXLWqxwywGoFZaX1w99I?p=preview</a></p>