refactor(ivy): move directive into elementStart (#21374)
We used to have a separate `directive` instruction for instantiating directives. However, such an instruction requires that directives are created in the correct order, which would require that template compiler would have knowledge of all dependent directives. This would break template compilation locality principle. This change only changes the APIs to expected form but does not change the semantics. The semantics will need to be corrected in subsequent commits. The semantic change needed is to resolve the directive instantiation error at runtime based on injection dependencies. PR Close #21374
This commit is contained in:
@ -56,8 +56,7 @@ export class TreeComponent {
|
||||
let cm0 = V(0);
|
||||
{
|
||||
if (cm0) {
|
||||
E(0, TreeComponent.ngComponentDef);
|
||||
{ D(1, TreeComponent.ngComponentDef.n(), TreeComponent.ngComponentDef); }
|
||||
E(0, TreeComponent);
|
||||
e();
|
||||
}
|
||||
p(0, 'data', b(ctx.data.left));
|
||||
@ -74,8 +73,7 @@ export class TreeComponent {
|
||||
let cm0 = V(0);
|
||||
{
|
||||
if (cm0) {
|
||||
E(0, TreeComponent.ngComponentDef);
|
||||
{ D(1, TreeComponent.ngComponentDef.n(), TreeComponent.ngComponentDef); }
|
||||
E(0, TreeComponent);
|
||||
e();
|
||||
}
|
||||
p(0, 'data', b(ctx.data.right));
|
||||
|
Reference in New Issue
Block a user