I've encountered an issue where I need to alter a div based on the selection of a radio button. Currently, it changes instantly upon button click, rather than waiting for submission. My desired outcome is for the value to be submitted when the button is clicked, and then for the content to change. Can anyone advise me on what I might be doing incorrectly?
The goal is to display different questions depending on the selected radio button. If YES is chosen, one set of questions is shown; if NO is chosen, another set appears. Subsequent questions remain consistent. (This part of the logic is functioning correctly)
onItemChange(value) {
console.log(value)
this.previous = false;
if (value == 1) {
this.yesOption = true;
} else if (value == 0) {
this.noOption = true;
}
}
Check out the working demo here: https://stackblitz.com/edit/angular-ivy-4lhhxh