i want to achieve that the queryParams can be dynmamically passed it. For now i can set the values of the params dynamically, but not the keys
Here is my Code
onItemClick(item: FilterItem, group: FilterGroup, i: number) {
let navigationExtras: NavigationExtras = {
queryParams: { name : group.items[i].param }
};
this.router.navigate(['/search'], navigationExtras);
}
I cannot put instead of "name" my group.name which is a string. I tried this:
queryParams: { group.name: group.items[i].param }
But here i get syntax error. How can i put the "key" of a queryParam through an object like that?