title: Refresh component after database update in Angular 5
body: <p>I have a parent component with route /home which contains a list and when a list item is clicked, I navigate to /home/edit/listid and update the database. After the database update, I am navigating back to /home. But the list is not updated until I refresh the page manually. 
  I also tried calling dataservice.getList() after updating the database, but no luck.
  Below is my code. Can someone please help me identify what I am missing?</p>
  
  <p><strong>Home Component</strong></p>
  
  <pre><code>ngOnInit() {
      this.loadList();
    }
    loadList() {
      this.dataservice.getList().subscribe(
        res =&gt; {
          this.List= res;
        },
        err =&gt; {
          console.log('Error Occoured');
          console.log(err);
        }
      );
    }
  </code></pre>
  
  <p><strong>DataService getList()</strong></p>
  
  <pre><code>getList(): Observable&lt;any[]&gt; {
      return this.http.post&lt;any[]&gt;('https://resturl/Prod/getdata', {
        'operation': 'getData'
        }
      });
    }
  </code></pre>
  
  <p><strong>Edit List</strong></p>
  
  <pre><code>this.dataservice.updateList().subscribe(
          updateAccRes =&gt; {
              this.dataservice.getList();
              this.router.navigate(['/home']);
            }
          },
          error2 =&gt; {
            console.log(error2);
          }
        );
  </code></pre>