<p dir="auto">If you reload a page, an isolated route will work, but route params will not.</p>
<p dir="auto">Related to:<br>
<a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="93625510" data-permission-text="Title is private" data-url="https://github.com/angular/angular/issues/2920" data-hovercard-type="issue" data-hovercard-url="/angular/angular/issues/2920/hovercard" href="https://github.com/angular/angular/issues/2920">#2920</a></p>
<p dir="auto"><a href="http://stackoverflow.com/questions/32429089/how-do-i-support-routeparams-on-page-reload-using-angular-2-dart?noredirect=1#comment52795245_32429089" rel="nofollow">http://stackoverflow.com/questions/32429089/how-do-i-support-routeparams-on-page-reload-using-angular-2-dart?noredirect=1#comment52795245_32429089</a></p>
<p dir="auto">FTA:</p>
<p dir="auto">Im using the Router and RouteParams in Angular 2 Dart.</p>
<p dir="auto">My routes are as follow:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="@RouteConfig(const [
  const Route(path: '/', component: ViewLanding, as: 'home'),
  const Route(path: '/landing', component: ViewLanding, as: 'landing'),
  const Route(path: '/flights', component: ViewFlights, as: 'flights'),
  const Route(path: '/picker/:cityDepart/:cityArrival/:dateDepart/:dateArrival/', component: ViewFlights, as: 'picker'),
  const Route(path: '/order/:id/:level/:dateDepart/:dateArrival/', component: ViewOrder, as: 'order'),
  const Route(path: '/order/complete', component: ViewComplete, as: 'orderComplete')
])"><pre class="notranslate"><code class="notranslate">@RouteConfig(const [
  const Route(path: '/', component: ViewLanding, as: 'home'),
  const Route(path: '/landing', component: ViewLanding, as: 'landing'),
  const Route(path: '/flights', component: ViewFlights, as: 'flights'),
  const Route(path: '/picker/:cityDepart/:cityArrival/:dateDepart/:dateArrival/', component: ViewFlights, as: 'picker'),
  const Route(path: '/order/:id/:level/:dateDepart/:dateArrival/', component: ViewOrder, as: 'order'),
  const Route(path: '/order/complete', component: ViewComplete, as: 'orderComplete')
])
</code></pre></div>
<p dir="auto">// Application Entry Point</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="void main() {
  print('-- Main.dart 2 --');
  bootstrap(Tickets, [
    routerInjectables,
    client_classes,
    // The base path of your application
    bind(APP_BASE_HREF).toValue('/'),
    // uncomment this if you want to use '#' in your url
    bind(LocationStrategy).toClass(HashLocationStrategy)
  ]);
}"><pre class="notranslate"><code class="notranslate">void main() {
  print('-- Main.dart 2 --');
  bootstrap(Tickets, [
    routerInjectables,
    client_classes,
    // The base path of your application
    bind(APP_BASE_HREF).toValue('/'),
    // uncomment this if you want to use '#' in your url
    bind(LocationStrategy).toClass(HashLocationStrategy)
  ]);
}
</code></pre></div>
<p dir="auto">This works fine with router-outlet / router-link / router.navigate</p>
<p dir="auto">However, on page reload - i don't get a positive match for routes with params. IE: if i refresh <a href="http://localhost:8080/#/picker/SAN/SFO/2015-01-01/2015-04-02" rel="nofollow">http://localhost:8080/#/picker/SAN/SFO/2015-01-01/2015-04-02</a> - i goto the parent view with no child routes. This symptom is true for any route with params.</p>
<p dir="auto">Navigating directly to or refreshing to: <a href="http://localhost:8080/#/flights/" rel="nofollow">http://localhost:8080/#/flights/</a> - works as expected - the ViewFlights component is instantiated</p>
<p dir="auto"><strong>Symptoms:</strong><br>
routing with params fails.</p>
<p dir="auto"><strong>Question:</strong><br>
How do i define route configurations to work with parameters on refresh</p>
<p dir="auto"><strong>Links:</strong><br>
<a href="https://github.com/rightisleft/web_apps_dart/blob/angular2/web/main.dart">https://github.com/rightisleft/web_apps_dart/blob/angular2/web/main.dart</a><br>
<a href="https://github.com/rightisleft/web_apps_dart/blob/angular2/lib/client/tickets.dart">https://github.com/rightisleft/web_apps_dart/blob/angular2/lib/client/tickets.dart</a></p>
<p dir="auto">When user visits URL like the <a href="http://example.com/path/part?queryParam=value" rel="nofollow">http://example.com/path/part?queryParam=value</a>, there is no access to the "queryParam" via RouteParams in the component that is configured to match the "/path/part" route.</p>
<p dir="auto">When the RootRouter class calls to the navigate method in its constructor, it passes in as a parameter only the path part of a URL discarding all query string parameters.</p>