I.e. applying Angular framework on existing HTML and bootstrapping all component from there on the fly. With current approach, all AoT compatible (so no JiT compiler included).
See working live demo.
- Exploring Angular DOM manipulation techniques using ViewContainerRef
- If You Think You Need the Angular 2 Runtime (JIT) Compiler
- Here is what you need to know about dynamic components in Angular
- How to manually bootstrap an Angular application
- doc-viewer component from Angular.io site project (aio).
@Input
s don't work, have to be manually restored (implemented)- Content projection works, but
<ng-content select="...">
doesn't (projects everything, no matter what you put inselect
attribute). ComponentFactory
overrides all element attributes (e.g. class), which causes problems if you set anything on Host component (e.g. using @HostBindings).
Author: Marcin Ryzycki @ryzmen. Any ideas how to improve it, please give me a shout!