簡體   English   中英

兩個下拉列表中的 select 選項,然后單擊按鈕時,它會重定向到與選項相關的 URL

[英]select options from two dropdown lists and after that when a button is clicked it redirect to the URL related to the options

假設我 select 第一個 select1 option1 它應該自動向我顯示 select 2 中的選項列表,當我 select select1 中的選項 2 時它應該向我顯示 select2 中的選項列表並且在從兩個下拉列表中選擇選項后當一個按鈕單擊它會重定向到與選項相關的 URL。 我怎樣才能在angular2中做到這一點? 參考圖片

在這里,我添加了用於從 select1 中選擇 option1 的示例鏈接,並基於該鏈接可以從 select2 中選擇 select option2 然后提供了一個按鈕,您可以在其中添加導航代碼並使用 router.navigate(['/']) 進行導航

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM