사용자 이름 목록이있는 드롭 다운 메뉴가 있습니다. 나는 리드를 원해. 이것을 어떻게 할 수 있습니까?각도 재료 - 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