title: angular 6 multiselect dropdown
body: <p>I want to choose the multiple values in angular 6 via the checkbox.
  Here i select the department in the dropdown the employees related to the department are listed in the another dropdown with checkbox. This is the process but actually the last value of the array is only displayed on the dropdown i use ng-multiselect-dropdown for selecting multiple values</p>
  
  <pre><code>{
     "content":[
        {
           "userid":6,
           "firstName":"Anns Jarigo",
           "lastName":"PaulRaj",
           "jobTitle":"JAVA_DEVELOPER",
           "position":"TEAM_MEMBER",
           "mode_of_employement":"Direct",
           "phoneNumber":"9087881162",
           "date_of_joining":"24-02-2018",
           "reportManager":"sampath.m@binary2quantum.com",
           "image":"anns.jpg",
           "userRole":"EMPLOYEE",
           "appUser":6,
           "department":"JAVA"
        },
        {
           "userid":7,
           "firstName":"Amanullah",
           "lastName":"H",
           "jobTitle":"JAVA_DEVELOPER",
           "position":"TEAM_MEMBER",
           "mode_of_employement":"Direct",
           "phoneNumber":"9087881162",
           "date_of_joining":"14-02-2018",
           "reportManager":"sampath.m@binary2quantum.com",
           "image":"aman.jpg",
           "userRole":"EMPLOYEE",
           "appUser":7,
           "department":"JAVA"
        },
        {
           "userid":8,
           "firstName":"Raj Prabhu",
           "lastName":"A",
           "jobTitle":"JAVA_DEVELOPER",
           "position":"TEAM_MEMBER",
           "mode_of_employement":"Direct",
           "phoneNumber":"9087881162",
           "date_of_joining":"26-07-2018",
           "reportManager":"sampath.m@binary2quantum.com",
           "image":"raj.jpg",
           "userRole":"EMPLOYEE",
           "appUser":8,
           "department":"JAVA"
        },
        {
           "userid":13,
           "firstName":"Subashri",
           "lastName":"P",
           "jobTitle":"JAVA_TRAINEE",
           "position":"INTERN",
           "mode_of_employement":"Direct",
           "phoneNumber":"9087881162",
           "date_of_joining":"17-08-2018",
           "reportManager":"sampath.m@binary2quantum.com",
           "image":"subashri.jpg",
           "userRole":"INTERN",
           "appUser":13,
           "department":"JAVA"
        }
     ],
     "status":"Success!"
  }
  </code></pre>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Component.ts
  
  getEmployees(deviceValue: String){
      this.service.getEmployee(deviceValue).subscribe(response=&gt;
    {
      this.employees=response.content;
      
    for(let i = 0 ; i &lt; this.employees.length; i++){
      this.test= this.employees[i].firstName;
      console.log(this.test+" test name")
      this.testId = this.employees[i].userid;
      this.dropdownList=[
          { item_id : this.testId , item_text: this.test}
          ]
  }
  
  this.dropdownSettings = {
        singleSelection: false,
        idField:'item_id',
        textField: 'item_text',
        selectAllText: 'Select All',
        unSelectAllText: 'UnSelect All',
        itemsShowLimit: 3,
        allowSearchFilter: true
      };
      
      HTML:
      
      &lt;ng-multiselect-dropdown
      [placeholder]="'custom placeholder'"
      [data]="dropdownList"
      [(ngModel)]="selectedItems"
      [settings]="dropdownSettings"
      (onSelect)="onItemSelect($event)"
      (onSelectAll)="onSelectAll($event)"
    &gt;
    &lt;/ng-multiselect-dropdown&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>`</p>