我使用了ngx-bootstrap模态.但是当我使用mat-select内部时,我遇到了问题.在模态后面的mat-select选项显示.我已经这些解决方案在这里的解决方案,并 同时这一个
这是我的代码
<ng-template style="border: 0px ;z-index: 100" #editTemplate>
<mat-form-field>
<mat-select multiple placeholder="Multiple Cities" [(ngModel)]="currentCity" name="Paris" ariaLabel="cities[0]">
<mat-option *ngFor="let city of cities" [value]="city.value">
{{ city.viewValue }}
</mat-option>
</mat-select>
</mat-form-field>
<ng-template>
Run Code Online (Sandbox Code Playgroud) material-design angular2-template angular-material2 angular2-modal angular
我包括表单输入,mat选择选项和自动完成字段以及选项也进入matDialog框.问题是选项显示在Dialog后面.我已经遇到过那些解决方案解决方案1,但没有解决这个问题.这是我的代码:
<mat-form-field class="wrapField">
<mat-select (selectionChange)="selectChange($event)" formControlName="product" placeholder="Alle Produkte">
<mat-option *ngFor="let product of products" value="{{product.id}}">{{product.nummer}}</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field class="wrapTime">
<input matInput placeholder="Startzeit" [formControl]="myControl" [matAutocomplete]="auto" formControlName="startTime" required>
<mat-autocomplete #auto="matAutocomplete">
<mat-option *ngFor="let option of filteredOptions | async" [value]="option">
{{option}}
</mat-option>
</mat-autocomplete>
</mat-form-field>Run Code Online (Sandbox Code Playgroud)
这里是style.css文件:
.cdk-global-overlay-wrapper, .cdk-overlay-container {
z-index: 99999 !important;
}Run Code Online (Sandbox Code Playgroud)
任何想法如何解决?