简体   繁体   中英

Angular Material 2: md-select doesn't show initial value

Good evening, I'm using Angular Material 2.0.0 beta1, and I've got troubles with md-select. Here is the code:

<md-select placeholder="Stato" [(ngModel)]="detail.doc_dst_serial"  name="stato"  >
     <md-option *ngFor="let status of statuses" [value]="status.dst_serial" >
        {{status?.description}}
     </md-option>
</md-select>

It correctly saves data in the ngModel and, consequently, in the database, but when I close and re-open the page, the selection is gone, with unset initial value.

可能要感谢测试版的更新,它有效..我没有改变任何东西

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM