title: How to set default value for a textfield inside for In Angular 4?
body: <p>I have a for loop where I am showing the selected product name and price. The user has an option to enter the quantity but by default, the quantity should be 1. How I can set the text field value with a default value of 1.</p>
  
  <p>I have tried the following way but it's not working:</p>
  
  <pre><code>&lt;tr *ngFor="let spro of selectedProd;let i = index;"&gt;
      &lt;td data-title="Product Name"&gt;{{spro.product_description}}&lt;/td&gt;
      &lt;td data-title="Unit Price" class="numeric"&gt;
          &lt;i class="fa fa-inr"&gt;&lt;/i&gt;2000&lt;/td&gt;
      &lt;td data-title="Qty" class="numeric"&gt;
          &lt;input type="text" [(ngModel)]="selectedProd[i].qty" name="qty" value="1"&gt;
      &lt;/td&gt;
      &lt;td data-title="Total Price" class="numeric"&gt;
          &lt;i class="fa fa-inr"&gt;&lt;/i&gt;{{selectedProd[i].qty*2000}}&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>