Reputation: 53
I have an Angular 14 application which by default load as
https://abc/checkout/index.html
but at sometimes I get the URL as
https://abc/checkout/index.html?isAddrPassedFromVSI=false&token=EC-7F3328316X938605Y&PayerID=3G93VFQNSW3PL
My route config is as follows,
routes: Routes = [
{
path: '',
component: CheckoutComponent,
},
{
path: 'checkout',
component: CheckoutComponent,
},
]
On second URL with query param, which I can ignore Im getting an error and page doesn
t load
Please help what should I fix here
Upvotes: 0
Views: 342
Reputation: 21
try this
routes: Routes = [
{path: '', redirectTo: '/checkout', pathMatch: 'full'},
{path: 'checkout',component: CheckoutComponent}
]
Upvotes: 1