title: How to navigate parent component from a model popup in angular?
body: <p>Suppose that I have two components. component(A) and a component(B).</p>
  <p>I want to open the (B) component as a NgbModal by using component (A).</p>
  <p>The below code is in component (A) to open component (B) as a model popup.</p>
  <pre><code>constructor(private modalService: NgbModal)
  {
  }
  
  openB()
    {
  
  this.modalService.open(BComponent);
  
  }
  </code></pre>
  <p>Now suppose that there is a button in the model component (B) and the function is like this.</p>
  <pre><code>searchData()
  {
  //process to find data.
  //
  
   this.activeModal.close();
   this.router.navigate(['/A']);
  }
  </code></pre>
  <p><strong>Issue :-</strong>
  (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)?</p>
  <p>Thanks in advance.</p>