I would like to know if it is possible to send data via navigateByUrl of Angular 7. I do not know if it is possible because I found little information about it. What I want to do is this: Send my selected client ID variable after clicking Enter in my TR(line of the table that is receiving focus). This through NavegateByUrl, is it possible?
My line:
<tr (keyup.enter)="customerSelected(selectedCustomer)">
My code:
customerSelected(customer_id){
this.selectedCustomer = customer_id;
this.router.navigateByUrl('cadastro/selectedCustomer'); //to send variable, how?
}
My method is wrong, I know. But how is the correct way to send my variable through NavigateByUrl?
Does anyone have any ideas for this? If you have one, thank you in advance. If the question was not explicit, comment.