title: How can I populate textbox based on combobox selection in Anglar?
body: <p>So, I have a combobox and I want my textboxes to be automatically filled whenever I choose something from the combobox. My combobox is named Aircraft type and it should automatically fill the textboxes named 'number of motors and MTOW' and the combobox named 'Type of Motor'. They are all coming from an API and they are all related with each other.
  Here is the code for my combobox and textboxes:</p>
  <pre><code>&lt;mat-form-field appearance=&quot;outline&quot; class=&quot;width-4&quot;&gt;
            &lt;mat-label&gt;Aircraft Type (ICAO)&lt;/mat-label&gt;
            &lt;mat-select formControlName=&quot;aircraftType&quot; required&gt;
              &lt;mat-option *ngFor=&quot;let item of aircraftTypes&quot; [value]=&quot;item.value&quot;&gt;
                {{ item.label }}
              &lt;/mat-option&gt;
            &lt;/mat-select&gt; &lt;/mat-form-field
          &gt;&lt;br /&gt;
          &lt;mat-form-field appearance=&quot;outline&quot; class=&quot;width-3&quot;&gt;
            &lt;mat-label&gt;Number of Motors&lt;/mat-label&gt;
            &lt;input
              maxlength=&quot;50&quot;
              matInput
              formControlName=&quot;numberMotors&quot;
              placeholder=&quot;Number of Motors&quot;
              required
            /&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field appearance=&quot;outline&quot; class=&quot;width-3&quot;&gt;
            &lt;mat-label&gt;Type of Motor&lt;/mat-label&gt;
            &lt;mat-select formControlName=&quot;typeMotors&quot; required&gt;
              &lt;mat-option *ngFor=&quot;let item of motorTypes&quot; [value]=&quot;item.value&quot;&gt;
                {{ item.label }}
              &lt;/mat-option&gt;
            &lt;/mat-select&gt;
          &lt;/mat-form-field&gt;
          &lt;mat-form-field appearance=&quot;outline&quot; class=&quot;width-3&quot;&gt;
            &lt;mat-label&gt;MTOW (kg)&lt;/mat-label&gt;
            &lt;input
              maxlength=&quot;50&quot;
              matInput
              formControlName=&quot;mtow&quot;
              placeholder=&quot;MTOW&quot;
              required
            /&gt;
          &lt;/mat-form-field&gt;
  </code></pre>
  <p><a href="https://i.stack.imgur.com/gEVVH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gEVVH.png" alt="here is the screenshot of my combobox('Aircraft Type')" /></a></p>
  <p><a href="https://i.stack.imgur.com/lxqQz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lxqQz.png" alt="here are the sample of the items to be filled" /></a></p>