我有一个形式包括3下拉菜单,这拉得到他们的数据API 问题是拉不结合的数据,如果我不击拉(模糊的任何提出申请的形式)
我HTML
<form [formGroup]="dropdownsForm" novalidate class="needs-validation">
<div class="dropdown">
<select class="form-control" formControlName="CountryName"
[attr.data-live-search]="true" style="width: 150px;" >
<option *ngFor="let Country of allCountrys" [value]="Country.id">
{{Country.title}}</option>
</select>
</div>
</form>
我ts
allCountrys: DropDownListForLkpsDto[];
constructor(
private fb: FormBuilder,
private _countryService: CountryServiceProxy
) {
}
ngOnInit(): void {
this.dropdownsForm = this.fb.group(
{
CountryName: [""],
}
);
this._countryService.getAllCountrysForDDl().subscribe(result => {
this.allCountrys = result;
});
}