Skip to content

ViewContainer should hydrate element injector after linking it #777

@vsavkin

Description

@vsavkin

Consider the following:

class ChildDirective {
  constructor(@Ancestor() parentDirective:ParentDirective){}
}

ParentDirective and ChildDirective are used as follows.

<parent>
  <div template="if true">
      <child></child>
  </div>
</parent>

This example should work, but it currently throws. It throws because we are hydrating the child element injector before attaching it to the tree, so it cannot find ParentDirective.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions