Suppose that I have two components. component(A) and a component(B).
I want to open the (B) component as a NgbModal by using component (A).
The below code is in component (A) to open component (B) as a model popup.
constructor(private modalService: NgbModal)
{
}
openB()
{
this.modalService.open(BComponent);
}
Now suppose that there is a button in the model component (B) and the function is like this.
searchData()
{
//process to find data.
//
this.activeModal.close();
this.router.navigate(['/A']);
}
Issue :- (A) component is not navigating and not calling ngOnInit() in component (A). How can I navigate the (A) component after clicking button in model popup (B)?
Thanks in advance.