Angular2 material select 默认值

前端之家收集整理的这篇文章主要介绍了Angular2 material select 默认值前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<mat-form-field@H_403_4@>@H_403_4@ <mat-select@H_403_4@ id@H_403_4@="xx-id"@H_403_4@ [(value@H_403_4@)]="a"@H_403_4@ name@H_403_4@="xx"@H_403_4@>@H_403_4@ <mat-option@H_403_4@ *ngFor@H_403_4@="let lvl of lvls"@H_403_4@ [value@H_403_4@]="lvl"@H_403_4@>@H_403_4@ @H_403_4@{{lvl@H_403_4@}}@H_403_4@ </mat-option@H_403_4@>@H_403_4@ </mat-select@H_403_4@>@H_403_4@ </mat-form-field@H_403_4@>@H_403_4@ [(value)]也可以换成[(ngModel)] "a"是默认值, component: this.a = lvls[0];@H_403_4@
原文链接:https://www.f2er.com/angularjs/144901.html

猜你在找的Angularjs相关文章