title: Setting values of input fields with Angular 6
body: <p>I've ran into some trouble setting the value of an input element using Angular.</p>
  
  <p>I'm trying to set the value of dynamically created input elements in my application by this method: </p>
  
  <pre><code>copyPricingToAll(): void {
    var copyValue: string = document.getElementById("priceInputGlobal").value;
  
    this.currentItem.orderLines.forEach(orderLine =&gt; {
    document.getElementById("priceInput-" + orderLine.id).setAttribute("value", copyValue);
     });
    }
  </code></pre>
  
  <p>I'm creating the rows like this:</p>
  
  <pre><code>&lt;ng-container *ngFor="let orderLine of currentItem.orderLines let i=index"&gt;
      &lt;tr&gt;
         &lt;td&gt;{{getCorrectTimeString(orderLine)}}&lt;/td&gt;
         &lt;td&gt;{{orderLine.quantity}}&lt;/td&gt;
         &lt;td&gt;&lt;input id="priceInput-{{orderLine.id}}" type="number" value="{{orderLine.price}}"&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/ng-container&gt;
  </code></pre>
  
  <p>Unfortunately .value is not recognized as a valid operation. I'm not sure how to correctly set the value of a dynamically created element in angular. I hope someone is able to help me out with this issue.</p>