title: Angular 5 : How to set Validation on two drop down list having same data?
body: <p>Data (json)</p>
  
  <pre><code>{
    "time": [
      "2017-1",
      "2017-2",
      "2017-3",
      "2017-4",
      "2017-5",
      ....
    ]
  }
  </code></pre>
  
  <p>Template (Angular Material)</p>
  
  <pre><code>&lt;mat-tab label="Recomandation Setting"&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-md-4"&gt;
            &lt;mat-form-field&gt;
              &lt;mat-select placeholder="Select Year/Week" class="DropDownYear" multiple&gt;
                &lt;mat-option *ngFor="let time1 of resYearData.time" [value]="time1"&gt;{{time1}}&lt;/mat-option&gt;
              &lt;/mat-select&gt;
            &lt;/mat-form-field&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="row"&gt;
          &lt;div class="col-md-4"&gt;
            &lt;mat-form-field&gt;
              &lt;mat-select placeholder="Select Year/Week" class="DropDownYear" multiple&gt;
                &lt;mat-option *ngFor="let time2 of resYearData.time" [value]="time2"&gt;{{time2}}&lt;/mat-option&gt;
              &lt;/mat-select&gt;
            &lt;/mat-form-field&gt;
            &lt;button mat-raised-button color="primary" (click)='toggle()'&gt;View&lt;/button&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  &lt;/mat-tab&gt;
  </code></pre>
  
  
  
  <p>I'm Having two Drop down list contains same data with multiple selection, If i select on 2017-1, 2017-2(First drop-down)  then this value should not be selected/populated in second drop-down. I'm beginner to angular/Material what should i put validation here! I don't know what logic should i write in <strong>HTML/Type-Script .</strong>
  thanks in advance  </p>