title: Angular 2+: How to access active route outside router-outlet
body: <p>I have an Angular 5 application.</p>
  
  <p>I have the following code in my app component.</p>
  
  <p>I want to hide navbar and topbar for particular routes.</p>
  
  <p>Is it possible to get currently activated route in <code>app.component.ts</code> ? if so, How ? </p>
  
  <p>If not possible, is there any solution to resolve this ( using guards or whatever else ... )?</p>
  
  <p><a href="https://i.stack.imgur.com/LXGIJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LXGIJ.png" alt="enter image description here"></a></p>
  
  <p>Also keep in mind that it should be reactive. when i switch to another route sidebar and navbar should show again.</p>