title: How to set array of values to accept property dynamically for input tag in angular 4
body: <p>I have following input tag, I need to set the accept value dynamically using array:</p>
  
  <pre><code> &lt;input #myFile type="file" /&gt;
  </code></pre>
  
  <p>To set the accept properties dynamically i am using view child:</p>
  
  <pre><code>@ViewChild("myFile") myFileRef: ElementRef;
  
  ngAfterViewInit() {
      this.myFileRef.nativeElement.accept = ['.pdf','.doc','.docx','.xlsx', '.xls'];
    }
  </code></pre>
  
  <p>This is not working, is it possible using angular or javascript?</p>