title: How to add selected items to another multiple select in angular?
body: <p>How to pass selected items to another list, so later on I can work with the final object/array? </p>
  
  <p>student.component.ts:</p>
  
  <pre><code>students= [];
  studentsFinal = [];
  
  onGetStudents() {
      this.studentService.getStudents()
            .subscribe(
            (students: any[]) =&gt; this.students = students,
            (error) =&gt; console.log(error),
          );
        }
  </code></pre>
  
  <p>student.component.html:</p>
  
  <pre><code>        &lt;h5&gt;Final student list&lt;/h5&gt;
          &lt;div class="col-xs-6"&gt;
              &lt;select name="multiselect1" multiple class="form-control" name="myselecttsms1"&gt;
  &lt;option *ngFor="let studentFinal of studentsFinal" value="{{ studentFinal.Id 
  }}"&gt;{{ studentFinal.Name }}&lt;/option&gt;
              &lt;/select&gt;
              &lt;br&gt;
          &lt;/div&gt;
  
          &lt;h5&gt;Students&lt;/h5&gt;
          &lt;div class="col-xs-6"&gt;
              &lt;select name="multiselect2" multiple class="form-control" name="myselecttsms2"&gt;
                  &lt;option *ngFor="let student of students" value="{{ student.Id }}"&gt;{{ student.Name }}&lt;/option&gt;
              &lt;/select&gt;
              &lt;br&gt;
          &lt;/div&gt;
  </code></pre>