title: Adding an array of items to textarea when selecting checkboxes in Angular 2
body: <p>I have a list of checkboxes in for loop and as I select one the name needs to get displayed in a textarea so as I keep selecting they need to get added and as I deselect they need to be removed. I am able to add the items but dispay only one at a time. I am unable to display array in the textarea. Also I was facing issues while trying to remove the deselected items. Please help. Below is my code....</p>
  
  <p>Checkbox</p>
  
  <pre><code>&lt;div *ngFor="let items of itemList"&gt;
    &lt;div class="xxx"&gt;&lt;input type="checkbox" id="chk" name="checker" (click)="AddToTextArea(items.Name)" /&gt;
     {{items.Name}}
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Text Area</p>
  
  <pre><code>&lt;textarea class="ttt" id="itemList" name="itemName" rows="5" [(ngModel)]="displayItemNameList"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>Component Method</p>
  
  <pre><code>public displayItemNameList = [];
  
  AddToTextArea(iName){
    this.displayItemNameList.push(iName);
  }
  </code></pre>
  
  <p>Also help me with If I am deseleciting how can I remove the item Name from the array. I was trying to check indexof for this not sure if that would be helpful. Please guide....</p>