Angular2 router, get route data from url, to display breadcrumbs
<p>I am using <a href="https://angular.io/docs/js/latest/api/router/index/Router-class.html">angular2 router</a>.</p>

<p>To draw the breadcrumb of an url, lets say site.com/a/b/c/15 I do the following:</p>

<ol>
<li>Get the route of <code>site.com/a/b/c/15</code> and get the pretty name associated to the route</li>
<li>Get the route of <code>site.com/a/b/c</code> and get the pretty name associated to the route</li>
<li>Get the route of <code>site.com/a/b</code> and get the pretty name associated to the route</li>
<li>Get the route of <code>site.com/a</code> and get the pretty name associated to the route</li>
</ol>

<p>So lets say I do have the following routes:</p>

<pre><code>{ path: 'a', component: A, data:{prettyName: 'I am A'}}
{ path: 'b', component: B, data:{prettyName: 'I am B'}},
{ path: 'c', component: C, data:{prettyName: 'I am C'}},
</code></pre>

<p>The result of my process would be an array containing <code>{"I am C", "I am B", "I am C"}</code> and thanks to that I can display a nice breadcrumb <code>"I am A &gt; I am B &gt; I am C"</code> that explains the current route.</p>

<p>This use to work with the router-deprecated doing </p>

<pre><code>this.router.recognize(url).then((instruction) =&gt; {
    instruction.component.routeData.get('prettyName') // Would return 'I am ..'
</code></pre>

<p>However now; with the last router I am not able to process this recognize logic anymore.</p>

<p><strong>How to get the route data associated to an url ?</strong></p>