title: Angular 6 - How to set dynamic type in html input using angular input decorator
body: <p>I'm passing dynamic type to input using angular <code>@Input</code> decorator. It's doesn't working and showing NaN value => <code>type="NaN"</code>. How I can acheive this? Here is my code:</p>
  
  <p><strong>datepicker.html</strong> </p>
  
  <pre><code>&lt;input  class="{{ value ? 'has-value' : '' }}"
          type="{{inputType}}"
          [(ngModel)]="value"
          [max]="getToday()"/&gt;
  </code></pre>
  
  <p><strong>datepicker.ts</strong></p>
  
  <pre><code>@Input() inputType: string;
  </code></pre>
  
  <p><strong>app.html</strong></p>
  
  <pre><code>&lt;app-datepicker [inputType]="datetime-local"[(ngModel)]="example1"
        (ngModelChange)="filter()"&gt;&lt;/app-datepicker&gt;
  
  &lt;app-datepicker [inputType]="date"[(ngModel)]="example2"
        (ngModelChange)="filter()"&gt;&lt;/app-datepicker&gt;
  </code></pre>