Hello all I am using some typescript reactive forms, like this
this.formControls.propertyType.valueChanges.subscribe((value: string) => {
if (!this.currentSelectedType) {
this.currentSelectedType = value;
} else {
if (this.currentSelectedType === CbcPropertyType.Other) {
this.openModal();
this.currentSelectedType = value;
} else {
this.currentSelectedType = value;
}
}
});
Is there some better solution for this part of the code, thanks