I am working on an angular project I want pass an array object as an parameter to another page through rouuting my function is as follows
Goto(item)
{
console.log(item.numtopics);
this.router.navigate(['/numbersystem'], { queryParams: item.numtopics});
}
and getting the data as follows
constructor(private route: ActivatedRoute) {
this.route.queryParams.subscribe( param => {
console.log(param);
});
}
but in console I am getting data like this
{0: "[object Object]", 1: "[object Object]", 2: "[object Object]"}
I am not getting the array data properly
any help. Thank You !!