diff --git a/aio/content/guide/dependency-injection-navtree.md b/aio/content/guide/dependency-injection-navtree.md index 7bac02dd8c..ba4a6984ac 100644 --- a/aio/content/guide/dependency-injection-navtree.md +++ b/aio/content/guide/dependency-injection-navtree.md @@ -1,5 +1,17 @@ # Navigate the component tree with DI +
+
Marked for archiving
+ +To ensure that you have the best experience possible, this topic is marked for archiving until we determine +that it clearly conveys the most accurate information possible. + +In the meantime, this topic might be helpful: [Hierarchical injectors](guide/hierarchical-dependency-injection). + +If you think this content should not be archived, please file a [GitHub issue](https://github.com/angular/angular/issues/new?template=3-docs-bug.md). + +
+ Application components often need to share information. You can often use loosely coupled techniques for sharing information, such as data binding and service sharing, @@ -170,7 +182,7 @@ Here's *Barry*. *Barry*'s `providers` array looks just like [*Alex*'s](#alex-providers). -If you're going to keep writing [*alias providers*](guide/dependency-injection-in-action#useexisting) like this you should create a [helper function](#provideparent). +If you're going to keep writing [*alias providers*](guide/dependency-injection-in-action#useexisting) like this you should create a helper function. For now, focus on *Barry*'s constructor. @@ -244,36 +256,3 @@ It doesn't in this example *only* to demonstrate that the code will compile and - - - -{@a provideparent} - - -### `provideParent()` helper function - -Writing variations of the same parent *alias provider* gets old quickly, -especially this awful mouthful with a [*forwardRef*](guide/dependency-injection-in-action#forwardref). - - - -You can extract that logic into a helper function like the following. - - - -Now you can add a simpler, more meaningful parent provider to your components. - - - - -You can do better. The current version of the helper function can only alias the `Parent` class interface. -The application might have a variety of parent types, each with its own class interface token. - -Here's a revised version that defaults to `parent` but also accepts an optional second parameter for a different parent class interface. - - - - -And here's how you could use it with a different parent type. - - diff --git a/aio/content/navigation.json b/aio/content/navigation.json index 93e341a41b..2db0d55e59 100644 --- a/aio/content/navigation.json +++ b/aio/content/navigation.json @@ -243,11 +243,6 @@ "url": "guide/dependency-injection-in-action", "title": "DI in Action", "tooltip": "Techniques for dependency injection." - }, - { - "url": "guide/dependency-injection-navtree", - "title": "Navigate the Component Tree", - "tooltip": "Use the injection tree to find parent components." } ] }