ui-router-server / ui-router-server / mergeSearch
Function: mergeSearch()
ts
function mergeSearch(location, incoming): string;Defined in: index.ts:140
Merges a request's search into a redirect location — the correct-by- default replacement for location + url.search, which yields ?a=1?b=2. Params the redirect target declared win; remaining request params are appended (all values of multi-value keys). Accepts the incoming search with or without the leading '?'. Operates on pathname?search#fragment strings as produced in redirect verdicts: a fragment (which format emits for a '#' param value) is detached before the merge and re-appended after it, so the query keeps its place ahead of the fragment.
Parameters
| Parameter | Type |
|---|---|
location | string |
incoming | string |
Returns
string