I'm having trouble passing data through the routerLink and calling the function()
. It doesn't seem to be working as expected. Here's an example of my code and you can view a working demo on StackBlitz.
First Component(HTML)
<span [routerLink]="/upcoming" [state]="{ data: {value}}">{{name}}</span>
Second Component(ts)
updateCategory(event) {console.log(event)}