formControlName in a children component : <p>I would like to create a custom input component and reuse it in my forms, but I am hitting an issue with formGroup and formControlName.</p>

<pre><code>// Form
&lt;form [formGroup]='loginForm'&gt;
  &lt;custom-input [myFormControlName]='email'&gt;&lt;/custom-input&gt;
&lt;/form&gt;

// CustomInput Component's Template
&lt;input formControlName='myFormControlName'&gt;
</code></pre>

<p>The problem appears to be that formControlName is expecting to be used with a FormGroup directive and since I am using formControlName in a sub-component it doesn't find the formControlName.. Anyone knows how to work around that?</p>
