title: Update child component from parent
body: <p>in <code>layoutcomponent</code> which is parent I have form. On submit I'm redirecting child component from <code>router-outlet</code> in search component. That's my submit</p>
  <pre class="lang-js prettyprint-override"><code>onSubmit({ value }: {
      value: Search
  }) {
      this.sharedData.searchStr = value.Search;
      
      let urlSegments = this.router.url.split('/');
  
      let lang = urlSegments[1];
  
      let url = lang + '/search';
      this.router.navigateByUrl(url);
  
  
      this.searchval.reset();
  }
  </code></pre>
  <p>I have shared service and there is interface <a href="https://stackoverflow.com/a/41345996/3801087">as suggested here</a> and it works.</p>
  <pre class="lang-js prettyprint-override"><code>import { Injectable, Inject } from '@angular/core';
  export interface ISharedModel {
      searchStr: string;
  }
  @Injectable()
  export class SearchService {
  
      sharedComponent: ISharedModel = {
        searchStr: ''
      };
  
      constructor() { }
  }
  </code></pre>
  <p>in child component I have <code>ngOnInit</code></p>
  <pre class="lang-js prettyprint-override"><code>ngOnInit() {
      this.sharedData = this.sharedResource.sharedComponent;
  
      this.searchval = new FormGroup({
          Search: new FormControl(this.sharedData.searchStr)
      });
  }
  </code></pre>
  <p>and it have html page</p>
  <pre class="lang-xml prettyprint-override"><code> &lt;form (ngSubmit)=&quot;onSubmit(searchval)&quot; [formGroup]=&quot;searchval&quot; &gt;
        &lt;input type=&quot;text&quot; placeholder=&quot;enter search string&quot; formControlName=&quot;Search&quot; class=&quot;form-control&quot;&gt;
        &lt;button class=&quot;btn btn-primary&quot;&gt;search&lt;/button&gt;
   &lt;/form&gt;
  </code></pre>
  <p>So on redirect application fills this textbox. <strong>But</strong> when It already is in `mydomain.com/en/search' and I enter search string in parent component it don't updates my child component.</p>
  <p>What can I do?</p>