How to send multiple data using href in Aurelia?
This works: <a href="#/candidate/upload/${cid}?t=${item.heading}">
Just need the syntax.
Not working:<a href="#/candidate/upload/${cid}?t=${item.heading};s=${item.sw_casedocumentid}">
This can be done using the route-href
custom attribute. I'm guessing you have a route configuration that looks something like this:
{ route: 'candidate/upload/:cid', name: 'upload', ... }
The cool thing with the router is that if you pass it parameters that don't exist on a route, it will just add them to the query string:
<a route-href="route: 'upload',
params.bind: { cid: cid; t: item.heading; s: item.sw_casedocumentid }"></a>
This will produce a link that looks how you want it to look.
解决方案:只需要在数据之间添加&
<a href="#/candidate/upload/${cid}?t=${item.heading}&s=${item.sw_casedocumentid}">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.