If you want to disable an option in side the select you can use the [attr.disabled] in the traditional model driven method.
<select >
<option [attr.disabled] = "true" value="a">a</option>
<option value="b">b</option>
</select>
Or else you can pass the [attr.disabled] a predicate which evaluates true or false.
Please find the Stackblitz here
How ever if you want to use the reactive forms method. this can be done in the form level and not FormGroup level. You can come up with solution in the selection change event while subscribing to your reactive form.
In your reactive form template :
<select (change)="changeCity($event)"formControlName="cityName">
<option value="">Choose your city</option>
<option *ngFor="let city of City" [ngValue]="city">{{city}}</option>
</select>
In your typescript controller :
export class AppComponent {
City: any = [1, 2, 3, 4];
constructor(public fb: FormBuilder) {
this.registrationForm.get("cityName").valueChanges.subscribe(val => {
if (val == 1) {
this.registrationForm.get("cityName").reset();
return;
} else {
this.registrationForm.get("cityName").enable();
}
});
}
}
Where in the case of user selecting 1 option it will reset its value and returns. Please find the StackBlitz here.