I wrote an Angular2 (v2.0.1) application that makes use of the router. The website is loaded with several query string parameters, so the full URL initially looks like this:
It turns out the undocumented way to do this without other hacks is to simply remove the leading slash in the "redirectTo" field. Since you are matching the full path you can have the certainty that it'll do what you want (i.e. no surprise url segments) and since it's no longer an absolute target, Angular will preserve the current query parameters.
So in this case
{
path: '',
redirectTo: '/comp1',
pathMatch: 'full'
}
becomes:
{
path: '',
redirectTo: 'comp1',
pathMatch: 'full'
}
Source: https://github.com/angular/angular/issues/13315