basically i am Updating user profile on which i have a user info. which is to be bind on the user respective fields.
this.editOfferprice= new FormGroup({
xyz : new FormControl(xxxx,[]),
xxx: new FormControl(xxxx,[Validators.required]),
wwwID : new FormControl(xxxx,[Validators.required]))};
on above code am using formgroup and formcontrol.
<mat-form-field fxFlex="49"> <mat-select placeholder="Select xxx" formControlName="xxx"> <mat-option *ngFor="let P of Pro" [value]="P.ID"> {{P.Name}} </mat-option> </mat-select> <mat-error *ngIf="editOffer.controls['xxx'].errors && editOfferprice.controls['xxx'].errors.required"> You must select NAme</mat-error> </mat-form-field>
i want to know how to bind data on dropdown?