Architecture: - Each brand has its own pages folder with Angular components - brand-routes.ts defines routes for default brand (dexar) - brand-routes.novo.ts defines routes for novo brand - angular.json fileReplacements swaps brand-routes.ts based on build config Structure: - src/app/brands/dexar/pages/ - Dexar HTML templates - src/app/brands/novo/pages/ - Novo components (TS + HTML) - src/app/brands/brand-routes.ts - Default (dexar) routes - src/app/brands/brand-routes.novo.ts - Novo routes This approach allows: - Adding 3rd, 4th, 5th brands by creating new folders - Each brand has completely separate templates - No @if conditionals needed in templates - Build-time separation (zero runtime overhead)
50 lines
1.7 KiB
TypeScript
50 lines
1.7 KiB
TypeScript
// Novo brand routes
|
|
// Loaded via angular.json fileReplacements when building for novo
|
|
import { Routes } from '@angular/router';
|
|
|
|
export const brandInfoRoutes: Routes = [
|
|
{
|
|
path: 'about',
|
|
loadComponent: () => import('./novo/pages/info/about/about.component').then(m => m.AboutNovoComponent)
|
|
},
|
|
{
|
|
path: 'contacts',
|
|
loadComponent: () => import('./novo/pages/info/contacts/contacts.component').then(m => m.ContactsNovoComponent)
|
|
},
|
|
{
|
|
path: 'faq',
|
|
loadComponent: () => import('./novo/pages/info/faq/faq.component').then(m => m.FaqNovoComponent)
|
|
},
|
|
{
|
|
path: 'delivery',
|
|
loadComponent: () => import('./novo/pages/info/delivery/delivery.component').then(m => m.DeliveryNovoComponent)
|
|
},
|
|
{
|
|
path: 'guarantee',
|
|
loadComponent: () => import('./novo/pages/info/guarantee/guarantee.component').then(m => m.GuaranteeNovoComponent)
|
|
}
|
|
];
|
|
|
|
export const brandLegalRoutes: Routes = [
|
|
{
|
|
path: 'company-details',
|
|
loadComponent: () => import('./novo/pages/legal/company-details/company-details.component').then(m => m.CompanyDetailsNovoComponent)
|
|
},
|
|
{
|
|
path: 'payment-terms',
|
|
loadComponent: () => import('./novo/pages/legal/payment-terms/payment-terms.component').then(m => m.PaymentTermsNovoComponent)
|
|
},
|
|
{
|
|
path: 'return-policy',
|
|
loadComponent: () => import('./novo/pages/legal/return-policy/return-policy.component').then(m => m.ReturnPolicyNovoComponent)
|
|
},
|
|
{
|
|
path: 'public-offer',
|
|
loadComponent: () => import('./novo/pages/legal/public-offer/public-offer.component').then(m => m.PublicOfferNovoComponent)
|
|
},
|
|
{
|
|
path: 'privacy-policy',
|
|
loadComponent: () => import('./novo/pages/legal/privacy-policy/privacy-policy.component').then(m => m.PrivacyPolicyNovoComponent)
|
|
}
|
|
];
|