ユーザー名のリストでmd-selectドロップダウンがあります。私はlead.idを選択したい。どうすればこれを達成できますか?角材 - md-select - ドロップダウンで選択した項目
<md-select formControlName="lead" ng-model="plan.lead.id" id="lead" style="min-width: 200px;">
<md-option *ngFor="let lead of users" [value]="lead.id">
{{lead.displayName}}
</md-option>
</md-select>
getLead() {
this.service.getLead(this.id)
.subscribe(res => {
this.plan = res;
console.log("lead: " + this.plan.lead);
});
}
コードでオプションを選択しようとしていますか?または、クリックされたオプションのIDを取得しますか? – Ploppy