'Can an Angular Component mimic a ViewChild from outside?

I have written a custom component (let's call it FeatureInput) that is nothing more than a composition of a feature rich component (let's assume for the example an input) and a button. Like this:

<div class="niceArrangement">
  <input>
  <button (click)="addSpecialCharacterToInput()">
</div>

As the FeatureInput component is overall just an input with a minimal addition, I would like it to behave exactly like an input for the eventual (developing) user - so that it can be given a label, exposes the NgModel of the inner input, has all the Inputs and Outputs etc.

The only option I found would be to manually add every field of the input to FeatureInput, which will be a lot of boilerplate code. Is there any other option?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source