feat(core): add support for Types in ViewContainerRef.createComponent (#43022)

With Ivy it's possible to create a `ComponentFactory` instance based on the generated Component def, thus the `ViewContainerRef.createComponent` can accept a Component instance and create a factory inside, rather than requiring additional complexity of creating a ComponentFactory outside (by invoking `ComponentFactoryResolver`).

This should simplify the API that is used for creating components dynamically.

DEPRECATION:

Angular no longer requires component factories to dynamically create components. The factory-based signature of the `ViewContainerRef.createComponent` function is deprecated in favor of a different signature that allows passing component classes instead.

PR Close #43022
This commit is contained in:
Andrew Kushnir
2021-05-05 16:55:44 -07:00
committed by Alex Rickabaugh
parent ab3de40ba3
commit 7dccbdd27b
13 changed files with 355 additions and 36 deletions
+1 -1
View File
@@ -15,7 +15,7 @@
"master": {
"uncompressed": {
"runtime-es2017": 4841,
"main-es2017": 462493,
"main-es2017": 463023,
"polyfills-es2017": 55373,
"styles": 69772,
"light-theme": 79025,