Notice that even though the [@Optional](guide/dependency-injection-in-action#optional) qualifier
is there for safety,
the <live-examplename="dependency-injection-in-action"></live-example>
confirms that the `alex` parameter is set.
{@a base-parent}
### Unable to find a parent by its base class
What if you *don't* know the concrete parent component class?
A re-usable component might be a child of multiple components.
Imagine a component for rendering breaking news about a financial instrument.
For business reasons, this news component makes frequent calls
directly into its parent instrument as changing market data streams by.
The app probably defines more than a dozen financial instrument components.
If you're lucky, they all implement the same base class
whose API your `NewsComponent` understands.
<divclass="alert is-helpful">
Looking for components that implement an interface would be better.
That's not possible because TypeScript interfaces disappear
from the transpiled JavaScript, which doesn't support interfaces.
There's no artifact to look for.
</div>
This isn't necessarily good design.
This example is examining *whether a component can
inject its parent via the parent's base class*.
The sample's `CraigComponent` explores this question. [Looking back](#alex),
you see that the `Alex` component *extends* (*inherits*) from a class named `Base`.
<code-examplepath="dependency-injection-in-action/src/app/parent-finder.component.ts"region="alex-class-signature"title="parent-finder.component.ts (Alex class signature)"linenums="false">
</code-example>
The `CraigComponent` tries to inject `Base` into its `alex` constructor parameter and reports if it succeeded.
[Parent](#parent-token) is the provider's class interface token.
The [*forwardRef*](guide/dependency-injection-in-action#forwardref) breaks the circular reference you just created by having the `AlexComponent` refer to itself.
*Carol*, the third of *Alex*'s child components, injects the parent into its `parent` parameter,
*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).
<imgsrc="generated/images/guide/dependency-injection-in-action/alice.png"alt="Alice in action">
</figure>
{@a parent-token}
### Parent class interface
You [learned earlier](guide/dependency-injection-in-action#class-interface) that a class interface is an abstract class used as an interface rather than as a base class.
The `Parent` class interface defines a `name` property with a type declaration but *no implementation*.
The `name` property is the only member of a parent component that a child component can call.
Such a narrow interface helps decouple the child component class from its parent components.
A component that could serve as a parent *should* implement the class interface as the `AliceComponent` does.
<code-examplepath="dependency-injection-in-action/src/app/parent-finder.component.ts"region="alice-class-signature"title="parent-finder.component.ts (AliceComponent class signature)"linenums="false">
</code-example>
Doing so adds clarity to the code. But it's not technically necessary.
Although `AlexComponent` has a `name` property, as required by its `Base` class,
its class signature doesn't mention `Parent`.
<code-examplepath="dependency-injection-in-action/src/app/parent-finder.component.ts"region="alex-class-signature"title="parent-finder.component.ts (AlexComponent class signature)"linenums="false">
</code-example>
<divclass="alert is-helpful">
`AlexComponent`*should* implement `Parent` as a matter of proper style.
It doesn't in this example *only* to demonstrate that the code will compile and run without the interface.
</div>
{@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).