我有以下链接
<a ui-sref="...">Clicking this adds ?test=true to the query params.</a>
你应该能够通过将参数传递给状态来实现.
尝试:-
<a ui-sref="yourStateName({test:true})">Clicking this adds ?test=true to the query params.</a>
ui-sref=’stateName’ – Navigate to state,no params. ‘stateName’ can be any valid absolute or relative state,following the same Syntax rules as $state.go()
ui-sref=’stateName({param: value,param: value})’ – Navigate to state,with params.