Questions tagged «client-side-scripting»

9
从react-router哈希片段获取查询参数
我在客户端上为我的应用程序使用react和react-router。我似乎无法弄清楚如何从如下网址获取以下查询参数: http://xmen.database/search#/?status=APPROVED&page=1&limit=20 我的路线如下所示(我知道该路线完全错误): var routes = ( <Route> <DefaultRoute handler={SearchDisplay}/> <Route name="search" path="?status=:status&page=:page&limit=:limit" handler={SearchDisplay}/> <Route name="xmen" path="candidate/:accountId" handler={XmenDisplay}/> </Route> ); 我的路线工作正常,但我不确定如何格式化路径以获取所需的参数。感谢任何帮助!
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.