I went through many links: How to reload the current route with the angular 2 router, but I did not get working solution for me.
I have the edit screen, through Edit Screen I can add student, when I successfully added student, I should be able to see newly added Student in the same screen. Is there any way if we can do this? I am using Angular 7.
addStudents(): void {
this.student.studentId = this.studentId;
console.log(this.student);
this.studentService.saveStudent(this.student).subscribe(response => {
console.log(response);
this.memberResponse = response;
});
this.ngOnInit();
this.router.navigate(['/student-edit', this.studentList]);
}