-1

suppose I select the first select1 option1 it should automatically show me the list of the options in select 2 and when I select option 2 in select1 it should show me a list of options in select2 and after selecting the options from two dropdown lists when a button is clicked it redirects to the URL related to the options. How can I do it in angular2?Reference image

Pixie Dust
  • 19
  • 3
  • Can you share your code for more explanation ! – Rebai Ahmed Feb 25 '22 at 10:53
  • it is similar to this (https://stackblitz.com/edit/angular-ivy-c8wsuc?file=src/app/app.component.ts). But I want to create a dropdown using select. Then when I select option1 and option 1.1 it should redirect to an URL and the same with other options. – Pixie Dust Feb 25 '22 at 12:03

1 Answers1

0

Here I have added my example link for selecting option1 from select1 and based on that you can select option2 from the select2 and then there's the button provided where you can add your navigation code and navigate using router.navigate(['/'])

Anna
  • 259
  • 1
  • 6