I need to pass an id along with a click event to another component
here is the component.ts
editData(rcid){
this.router.navigate(['/Editdata']);
}
rcid is the id of the clicked item. And router"/editdata" is where the id is to be passed.
I had checked with session and local storage but it need to refresh the page when coming with another id
please help me with this. I'm new to angular
you can pass a second argument to
navigate
that implementsNavigationExtras
interface:at your receiving component you can extract it: