title: Angular 6 ActivatedRoute url
body: <p>Here I have MyComponent in which router loads different other components depending on route, I want to get full current route in header component, but ActivatedRoute.url is showing only {path: "d"} not the full path, or the last part of path(which I need). 
  Do you have any ideas on how can I get in header component the loaded route.</p>
  
  <p><strong>my-component.component.html</strong></p>
  
  <pre><code>&lt;app-header&gt;&lt;/app-header&gt;
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  </code></pre>
  
  <p><strong>header.component.ts</strong></p>
  
  <pre><code> ...
  constructor(private route: ActivatedRoute) {}
  ngOnInit() {
      this.route.url.subscribe(url=&gt;console.log(url));
  }
  </code></pre>
  
  <p><strong>my-module-routing.module.ts</strong></p>
  
  <pre><code>    {
      path: 'd',
      component: MyComponent,
      children: [
          {
              path: 'discover',
              component: DiscoverComponent
          },
          {
              path: 'book/:id',
              component: BookPageComponent
          },
          {
              path: 'search',
              component: SearchPageComponent
          }]
      }
  </code></pre>
  
  <hr>
  
  <p>when on d/search console.logs</p>
  
  <pre><code>[UrlSegment]
  0: UrlSegment
  parameterMap: ParamsAsMap
  parameters: {}
  path: "d"
  __proto__: Object
  length: 1
  __proto__: Array(0)
  </code></pre>