如何通过在 angular 中选择其他 mat-select 的值来过滤 mat-select

时间:2021-05-06 09:45:04

标签: angular angular-material

我有两个 mat-select,想通过第一个 mat-select 中的选定值过滤第二个 mat-select: html代码是:

<mat-label>products</mat-label>
         <mat-form-field appearance="fill" class = "tp-full-width">
         <mat-select  #captionlist>
             <mat-option  *ngFor="let p of list_product.data" [value]="p">
                {{ p.description }}
             </mat-option>
         </mat-select>
         </mat-form-field>
                      
         <mat-form-field appearance="fill" class = "tp-full-width">
         <mat-label>brand</mat-label>
             <mat-select  #brandlist>
                  <mat-option  *ngFor="let m of list_brands.data" [value]="m">
                     {{ m.BDesc }}
                  </mat-option>
             </mat-select>
         </mat-form-field>

请帮帮我,在类型脚本中写什么来做到这一点?

0 个答案:

没有答案