angular2-component-outlet
$ npm install --save angular2-component-outlet
Current Angular Version: 2.0.2
Live Demo: Plunker
ComponentOutlet is a directive to create dynamic component.
Example:
Result:
Dynamic Component Notes
ComponentOutletneedsRuntimeCompilerprovided byplatform-browser-dynamic. You cannot useplatformBrowserinstead ofplatformBrowserDynamic.- For AoT compilation, you can use
platformBrowserDynamic().bootstrapModuleFactory().
- For AoT compilation, you can use