After receiving a string of query parameter values such as:
var querys = "agentId=5&page=2&name=andrew"
Is there a more efficient way to utilize this exact string for navigation using this.router.navigate
? Otherwise, I'll have to manually input each value like so:
this.router.navigate(['/admin/list'], { queryParams: { agentId: 5, page: 2, name: andrew } });
This approach can become cumbersome, especially when the keys of the query parameters are unknown.