title: How to add input fields dynamically in angular 6
body: <p>I need to add input fields to array of objects and a map which grows dynamically based on user's choice.</p>
  
  <p>For e.g. <code>InputForm</code> has a list and a map which needs to be filled by user.</p>
  
  <pre><code>export class InputForm {
    mapA: {};
    listA: ListA[] = [];
  }
  
  export class ListA {
      input1 : String
      input2 : number
  }
  </code></pre>
  
  <p>I need to show it on UI in such a way that input1, input2 and key, value for map of criteria is visible as the input field. The user fills all 4 input fields and clicks on the add button.</p>
  
  <p>Then again same input fields should be editable for the user for the second input. This way he can build list and map and when he clicks on submit button array and map should have all the values filled before. </p>
  
  <p><code>*ngFor</code> doesn't work because the initial list is empty.</p>