Bind href Url depending on radio buttons selected

Viewed 14

what I need to achieve is, for example, If the user select ‘winter’ and ‘may’ when click the button save of the second form , redirect to an external url , how can I send the value of the url depending of the values selected?

I was thinking in this conditional but of course not working, how can I bind the value of the url?

redirectTo() {
    if (this.seasonSelected === 'Winter' && this.monthSelected === 'April') {
      return 'https://www.google.com/';
    } else if (this.seasonSelected === 'Summer' && this.monthSelected === 'May') {
      return 'https://www.instagram.com/';
    }
  }

STACKBLITZ

0 Answers
Related