Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Getting required * for select dropdown
posted
I'm trying to get required asterisk for select dropdown. Kindly let me know what am I missing?
I tried html select too which is commented part of code.
.html
<td>
<!-- <select igxSelect formControlName="partner" placeholder="Partner" required>
<option *ngFor="let partner of sortedPartnerList" [value]="partner" name="partner">{{partner}}</option>
</select> -->
<igx-select formControlName="partner" required="required">
<igx-select-item *ngFor="let partner of sortedPartnerList" [value]="partner" name="partner">
{{partner}}
</igx-select-item>
<label igxLabel for="partner">Partner</label>
<ng-template igxSelectToggleIcon>
<igx-icon fontSet="material">person</igx-icon>
</ng-template>
</igx-select>
</td>
.ts
buildForm() {
this.form1 = this.formBuilder.group({
partner: [null, [Validators.required]],
});
}
Parents Reply Children
No Data