Files
qr_vitanova/src/app/app.routes.ts

22 lines
682 B
TypeScript
Raw Normal View History

2026-04-30 01:17:17 +04:00
import { Routes } from '@angular/router';
2026-04-23 03:49:40 +04:00
2026-04-30 01:17:17 +04:00
export const routes: Routes = [
{
path: '',
2026-04-30 15:00:24 +04:00
loadComponent: () => {
// Branch: ?id=<orderId> means legacy SBP merchant flow.
const hasLegacyId = typeof window !== 'undefined'
&& new URLSearchParams(window.location.search).has('id');
return hasLegacyId
? import('./pages/legacy-pay-page/legacy-pay-page').then((m) => m.LegacyPayPage)
: import('./pages/fastcheck-page/fastcheck-page').then((m) => m.FastcheckPage);
}
2026-04-30 01:17:17 +04:00
},
{
path: 'new',
loadComponent: () =>
import('./pages/create-page/create-page').then((m) => m.CreatePage)
},
{ path: '**', redirectTo: '' }
];