Not able to load component dynamically
<p>I tried to create a sample application where I wanted to load a component dynamically on a button click event from the parent component. But when I click on the button the component is not loaded instead I am getting the following error in the browser console. Please visit the <a href="https://plnkr.co/edit/gPVvyKAuwIIm0aKRZ3l6?p=preview" rel="nofollow">plunker</a> for application code</p>

<pre><code>zone.js:461Unhandled Promise rejection: Cannot read property 'createComponent' of undefined ; Zone: angular ; Task: Promise.then ; Value: TypeError: Cannot read property 'createComponent' of undefined
    at eval (https://run.plnkr.co/EQ3xbfuUPWfMTU2C/src/app.ts!transpiled:38:45)
    at ZoneDelegate.invoke (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:323:29)
    at Object.onInvoke (https://npmcdn.com/@angular/core/bundles/core.umd.js:9100:45)
    at ZoneDelegate.invoke (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:322:35)
    at Zone.run (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:216:44)
    at https://npmcdn.com/zone.js@0.6.12/dist/zone.js:571:58
    at ZoneDelegate.invokeTask (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:356:38)
    at Object.onInvokeTask (https://npmcdn.com/@angular/core/bundles/core.umd.js:9091:45)
    at ZoneDelegate.invokeTask (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:355:43)
    at Zone.runTask (https://npmcdn.com/zone.js@0.6.12/dist/zone.js:256:48)
</code></pre>