Is it possible to send a complex object through a router? Here is what I'm doing and trying to do:
From the search page, a use can click a button on one of the results which calls the method that causes this line to fire. this.router.navigate(['profile-detail', selection]);
The selection
object looks like this just before the navigate.
{
profile: {
id: number,
fname: string,
lname: string
},
contact: {
type: string,
address: string
},
books: [{
title: string,
author: string
}]
}
However, when we get to the profile-detail page, the this.route.snapshot.params
has this as the actual data:
{
profile: "[object Object]",
contact: "[object Object]",
books: "[object Object]"
}