첫 번째 선택 옵션을 선택하지 않은 경우 두 번째 선택 옵션과 입력 값을 비활성화하려면 어떻게합니까? 내 경우, 첫 번째 선택 옵션은 "Select Ingredient"입니다. 구독하고 결과가 성공하면 두 번째 선택 옵션과 입력 값을 사용하도록 설정 한 "재료 선택"이벤트가 있습니다. 여기 내가 만든 stackblitz 코드. 당신은 topping_id 제어를 처음들을 해제 할 수 있습니다첫 번째 선택 옵션이 각도 4로 선택되지 않은 경우 두 번째 선택 옵션 비활성화
https://stackblitz.com/edit/angular-rgxfsa?file=app/app.component.ts
onSelectIngredient(event): void {
const ingredient_id = this.productForm.get('ingredient_id').value
// this.subscription = this.ingredientService.selectIngredient(ingredient_id)
// .subscribe(
// (data:any) => {
// this.ingredient = data;
// },
// error => {
// console.log(error);
// })
}
감사합니다. – Joseph