title: Angular 2 - Can't get url from router
body: <p>I can't get the url when I use <code>console.log(_router.url)</code>. It only returns a <code>/</code> (slash)</p>
  
  <p>When I do the below code:</p>
  
  <pre><code>constructor(
      private el: ElementRef,
      private _auth:AuthenticationService,
      @Inject(AppStore) private store: Store&lt;AppState&gt;,
      private _router:Router,
    ) {
  
      console.log(_router);
      console.log(_router.url);
    }
  </code></pre>
  
  <p>This is the result of <code>console.log(_router)</code>
  <a href="https://i.stack.imgur.com/k6fyL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k6fyL.jpg" alt="enter image description here"></a></p>
  
  <p>when (...) is clicked it displays <code>"/languages"</code></p>
  
  <p><a href="https://i.stack.imgur.com/u07bL.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u07bL.jpg" alt="enter image description here"></a></p>
  
  <p>but when I <code>console.log(_router.url)</code> this is only it prints</p>
  
  <p><a href="https://i.stack.imgur.com/w38lN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w38lN.jpg" alt="enter image description here"></a></p>