I am trying to send data(Object) from one component to another however I am getting an empty result.
Here is my code
routing module
{ path: 'booking/details', component: DetailsComponent, data: { title: extract('Details'), dataTransfer: '' } },
sending component
this.router.navigate(['/booking/details', this.caseData]);
this.caseData looks like this
{
"getAllInfo": {
"ticket": {
"internalNum": "12345",
"comp": "11"
},
"caseInfo": {
"masVolgnommer": "1",
"masMaand": "1",
"masJaar": "2010"
}
}
}
receiving component
this.caseData = this.route
.data
.subscribe(v => console.log(v.dataTransfer));
dataproperty. It sounds like you may be better off creating a shared service.