如何从Mat-form-field中删除Mat-form-field-wrapper?

时间:2020-07-06 07:47:50

标签: html css angular mat-form-field

我正在使用Angular mat-form-field,并且在更改CSS后使其看起来像mat-chip,我想摆脱这个外包装盒(mat-form-field-wrapper)。

Need to get rid of the wrapper

<div class="flex">
 <div class="etc">
  <mat-chip-list i18n-aria-label aria-label="Selected Roles">
  <form [formGroup]="filterForm" >
  <mat-form-field appearance="outline" class="no-line" >

  <mat-select
    i18n-aria-label
    i18n-placeholder
    disableOptionCentering
    multiple
    aria-label="Experience level filter"
    formControlName="experienceLevelsFilter"
     placeholder="Experience Level"
    panelClass="panel-below-field"
    (selectionChange)="filterChange($event, 'experienceLevels')"
   >
    <mat-select-trigger>
      Experience Level {{ getSelected("experienceLevels") }}
    </mat-select-trigger>

    <mat-option
      *ngFor="let experienceLevel of experienceLevels"
      class="experience-level-option"
      [value]="experienceLevel"  >
      {{ experienceLevel.getName() }}
    </mat-option>
    </mat-select>
   </mat-form-field> 
  </form>
 </mat-chip-list>
</div>

1 个答案:

答案 0 :(得分:1)

请删除芯片列表标签,它应该可以正常工作。

代码:

Error.captureStackTrace