title: How to dynamically select the input radio when you edit an item on the form?
body: <p>I have a form with 2 different categories (radio input), that each of them has its own inputs. Now I need to add an "edit" functionality, I couldn't find out how to show the proper edited form because the radio input always refer to the last selected category (I need to manually switch, then I will see the content of the form which I need to edit). How to solve this the angular2 way? (I am new with angular)</p>
  
  <p>This is how the form set up:</p>
  
  <pre><code>&lt;form #formRef="ngForm" novalidate&gt;
    &lt;div&gt;
      &lt;label for="fruits"&gt;
        &lt;input type="radio" name="fruits"
        [(ngModel)]="toggleFormType" #toggleFormTypeRef="ngModel" checked
        &gt;
        Fruits
      &lt;/label&gt;
      &lt;label for="vegetables"&gt;
        &lt;input type="radio" name="vegetables"
        [(ngModel)]="toggleFormType" #toggleFormTypeRef="ngModel" checked
        &gt;
        Vegetables
      &lt;/label&gt;
    &lt;/div&gt;
  
    &lt;fieldset 
    ngModelGroup="fruits" *ngIf="toggleFormType === 'fruits'"&gt;
      // Inputs for fruits
    &lt;/fieldset&gt;
  
    &lt;fieldset 
    ngModelGroup="vegetables" *ngIf="toggleFormType === 'vegetables'"&gt;
      // Inputs for fruits
    &lt;/fieldset&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Later on I have <code>ngFor</code> to show the items:</p>
  
  <pre><code>&lt;li *ngFor="let item of fruits; let i = index"&gt;
    {{item.fruit.name}}
    &lt;a href="#" (click)="editItem(item, i)"&gt;
  &lt;/li&gt;
  
  &lt;li *ngFor="let item of vegetables; let i = index"&gt;
    {{item.vegetable.name}}
    &lt;a href="#" (click)="editItem(item, i)"&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>When I hit the <code>editItem</code> I could see that everything works fine (I could see the pre content &amp; save it with the new one), the only thing I am missing is that I need to switch the proper <code>category</code>. I need it to show the proper <code>category</code> which is the category of the edited item. What am I missing?</p>