title: Dynamically add control to form in angular
body: <p>I've created this form here: <a href="https://stackblitz.com/edit/angular-ay58g9" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-ay58g9</a></p>
  
  <p>I'm getting an error when selecting the option from select menu that I'm not able to solve.</p>
  
  <p>Also, I want the output like this:</p>
  
  <pre><code>When 'form data' selected in dropdown:
  [
    data_type: 'form_data',
    form_data: {
      firstname: "saurabh",
      lastname: "Sharma"
    }
  ]
  
  When 'form data' selected in dropdown:
  [
    data_type: 'raw_data',
    raw_data: {
      email: "saurabh@gmail.com",
      contactno: "9999999999"
    }
  ]
  </code></pre>
  
  <p>COuld you please look into it and tell me what I'm doing wrong?</p>