title: Hide component from any active component?
body: <p>There is a component <code>&lt;app-tabs-components&gt;</code>.</p>
  
  <p>It gets data from service. There is variable <code>show: boolean</code> in this service to <strong>show/hide</strong> component on the page.</p>
  
  <pre><code>@Injectable({ providedIn: "root" })
  export class TabService {
      show = false;
      showHide(status: boolean) { 
          this.show = status;
      }
  
       get() {
            return this.show;
       }
  }
  </code></pre>
  
  <p>Problem is that I need to call <code>tabService.showHide(false)</code> in every component where I want to hide component <code>&lt;app-tabs-components&gt;</code>. </p>
  
  <p>Component <code>&lt;app-tabs-components&gt;</code> always should be closed if it lost focus, not active area.</p>
  
  <p>In my case I am breaking DRY principle.</p>
  
  <p>For example, when user activates any component I must do:</p>
  
  <pre><code>ngOnInit() {
    tabService.showHide(false)
  }
  </code></pre>
  
  <p>So this part of code is repeated ine each component where I wan to hide tabsComponent</p>