I am trying to pass parameters to one component in this format www.domain.com?param=value
, but Angular keep sending parameters like this www.domain.com;param=value
. Why replace ?
for ;
?
This is my route conf:
const router: Routes = [
{path: '', redirectTo: '/shops', pathMatch: 'full'},
{path: 'shops', component: ShopComponent, canActivate: [AuthManager]},
{path: 'shop/new', component: NewShopComponent, canActivate: [AuthManager]},
{path: 'shop/new/:id', component: NewShopComponent, canActivate: [AuthManager]},
{path: 'login', component: LoginComponent},
{path: 'register', component: RegisterComponent},
{path: '**', component: ShopComponent}
];
and this how I pass the values
this._router.navigate(['shops', {id: id}]);
if I pass it like
this._router.navigate(['shops?id=id']);
i get undefined route error.