Angular 2 ContentChild Apply Html Attributes
<p>I have a custom component that applies bootstrap form group to my form fields. In my component I have below properties:</p>

<pre><code>import { Component, Input, ContentChild } from '@angular/core';
import { NgControl } from '@angular/common';

@Component({
    selector: 'form-field',
    template: `
            &lt;div class="form-group" [ngClass]="{'has-error':(state &amp;&amp; !state.valid &amp;&amp; state.touched)}"&gt;
                &lt;label *ngIf="label" [attr.for]="state.name" class="col-sm-3 control-label"&gt;{{label}}&lt;/label&gt;
                &lt;div class="col-sm-9"&gt;
                    &lt;ng-content&gt;&lt;/ng-content&gt;
                    &lt;div *ngIf="state &amp;&amp; !state.valid &amp;&amp; state.errors &amp;&amp; state.touched" class="help-block text-danger"&gt;
                        &lt;span *ngIf="state.errors.required"&gt;{{label? label:'This field'}} is required&lt;/span&gt;
                        &lt;span *ngIf="state.errors.min"&gt;{{label? label:'Value'}} too small&lt;/span&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            `
})
export class FormFieldComponent{
    @Input()
    label: string;

    @ContentChild(NgControl) state;
}
</code></pre>

<p>And in my template I use my component like this:</p>

<pre><code>&lt;form [ngFormModel]="form" (ngSubmit)="onSubmit()" novalidate&gt;
    &lt;form-field label="First Name"&gt;
     &lt;input ngControl="firstName" type="text"&gt;
    &lt;/form-field&gt;
&lt;/form&gt;
</code></pre>

<p>I was wondering is there any way to dynamically set the placeholder text for the control through my component?</p>

<p>I want the label to be set as placeholder of the input field i.e.</p>

<p></p>