title: How to refresh/reload a parent component onclick of child component submit button in angular 6?
body: <p>My parent component ts file contains this code:</p>
  
  <pre><code> openNewModal(): void {
      this.$modal.show(CategoryAddModalComponent)
          .subscribe(r =&gt; {
     });
     location.reload();
    }
  </code></pre>
  
  <p>My child component html:</p>
  
  <pre><code>    &lt;form action=""&gt;
      &lt;label&gt;Enter Category&lt;/label&gt;
          &lt;input name="cate" type="text"&gt;
          &lt;input name="category" type="text"&gt;
          &lt;button class="common-btn btn-cancel" (click)="modal.hide();l&gt;Cancel&lt;/button&gt;
      &lt;button class="common-btn btn" type="submit" (click)="fun_addcategory()"&gt;Submit&lt;/button&gt;
     &lt;/form&gt;
  </code></pre>
  
  <p>So using this openNewModal() function Im calling my child component model. Now On submit of my child component I need to reload my parent component file.  If I try to call location.reload in this function, my child component is getting reloaded. But I need to reload parent component. Can somebody please guide me how to do this?</p>