angularangular2-formsangular-material2md-select

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.


Solution

  • Probably thanks to the update of the beta it works.. I haven't changed anything