I have a primeng Data table and I want to pass selected row to other page through routers. Ex: I have a student data table and when I select one student row and click on submit button, It should display the details in StudentDetails Page.
Here I can able to select the row and able to pass the data to student component. But unable to pass data to student details component.
export class Student {
selectedRow:Student;// I can able to assign selected row here
navigateStudentDetail(){
this.router.navigate(['./studentdetail']);
}
I can able to pass studentId using query param, But I want to pass my student object to studentdetails component. But unable to do it.
Is there any easy way to achieve this? Please help me