Good evening,
I'd like to know the best way to pass a complex object using [routerLink] directive, and how to read it.
ie:
complexObject = {
x : 'ok',
y: {
a: 2,
b: 'test'
},
}
<a [routerLink]="['/example/example-test', complexObject ]">
this.activatedRoute.paramMap.subscribe(complexObject => {
complexObject.get('x') // ok
complexObject.get('y') // The nested object 'y' is a string like [object object]
}
Thanks in advance