title: Update parent component when navigating from child Component (Angular)
body: <p>I'm having some trouble with updating the parent component when routing from child component. This much I've found out by researching, is that ngOnInit only gets called once, but how to work around this? I've tried different lifecycle hooks, but either I've not been able to use them correctly or I should not use at all! Could someone please help? THANKS!</p>
  
  <p>My routes:</p>
  
  <pre><code>{
      path: 'dashboard',
      component: DashboardComponent,
      children: [
          {
              // when user is on dashboard component, no child component shown
              path: '', 
          },
  
          {   // detail component
              path: ':table/:id', // 
              component: DetailComponent,
          },
          //some more child routes and components...
      ]
  }
  </code></pre>
  
  <p>ngOnInit in dashboard component (parent)</p>
  
  <pre><code>ngOnInit() {
      this.getSomething1(); // this populates an array
      this.getSomething2(); // this populates an array
  }
  </code></pre>
  
  <p>When user choses an item from one of the arrays above, user gets routed to detail page of that item (DetailComponent) where user can update/delete that item.</p>
  
  <p>Method in child component, when user deletes item, user gets routed to parentcomponent:</p>
  
  <pre><code>deleteItem(item: any) {
      // some code... 
      this._router.navigate(['dashboard']); 
  }
  </code></pre>
  
  <p>So all works fine, EXCEPT that the array of items does not get updated, since ngOnInit is called just once. </p>
  
  <p>So I would like to run the methods <code>getSomething1()</code> and <code>getSomething2()</code> when user gets routed back to <code>DashboardComponent</code> from child component <code>DetailComponent</code>.</p>
  
  <p>Thanks for any help!</p>