title: Angular refresh table after delete record, using material table and rest api
body: <p>I have a material Table with expandable rows (<a href="https://material.angular.io/components/table/examples" rel="nofollow noreferrer">https://material.angular.io/components/table/examples</a>) and I want to manage delete into the table itself, so I create a delete button with a function that trigger the delete event. The api works, the record is correctly deleted, but the table is not refreshed after delete, and I want to implement this behaviour. Here a stackblitz with fake api: <a href="https://stackblitz.com/edit/angular-comzph" rel="nofollow noreferrer">https://stackblitz.com/edit/angular-comzph</a></p>
  
  <p>I try, in my delete function to call ngOnInt and to navigate back to the same route, but nothing happens...</p>
  
  <pre><code>deleteCustomer(id) {
   this.api.deleteCustomer(id)
    .subscribe(res =&gt; {
      alert(`cliente rimosso`);
      // TODO fix reload list after delete
      // this.router.navigate['/clienti'];
      this.ngOnInit();
    }, (err) =&gt; {
      console.log(err);
    }
   );
  }
  </code></pre>
  
  <p>I try to use <a href="https://stackoverflow.com/questions/39535192/angular2-update-ui-after-deleting">this solution too</a>, but does not works. I try using ngOnChange and ngOnDestroy, but does not works too...</p>
  
  <p>Could someone help me?</p>