app-routing.module.ts 2.28 KB
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { SplashScreenComponent } from './modules/splash-screen/splash-screen.component';
import { AdminComponent } from './modules/admin/admin.component';

const routes: Routes = [
  { path: '', component: SplashScreenComponent },
  {
    path: '',
    component: AdminComponent,
    children: [
      {
        path: 'info-formas-pago',
        loadChildren: () => import('./modules/info-formas-pago/info-formas-pago.module').then(m => m.InfoFormasPagoModule)
      },
      {
        path: 'opcion-pedido',
        loadChildren: () => import('./modules/opcion-pedido/opcion-pedido.module').then(m => m.OpcionPedidoModule)
      },
      {
        path: 'seleccion-articulos',
        loadChildren: () => import('./modules/seleccion-articulos/seleccion-articulos.module').then(m => m.SeleccionArticulosModule)
      },
      {
        path: 'carrito',
        loadChildren: () => import('./modules/carrito/carrito.module').then(m => m.CarritoModule)
      },
      {
        path: 'forma-pago',
        loadChildren: () => import('./modules/forma-pago/forma-pago.module').then(m => m.FormaPagoModule)
      },
      {
        path: 'pago-electronico',
        loadChildren: () => import('./modules/pago-electronico/pago-electronico.module').then(m => m.PagoElectronicoModule)
      },
      {
        path: 'pago-tarjeta',
        loadChildren: () => import('./modules/pago-tarjeta/pago-tarjeta.module').then(m => m.PagoTarjetaModule)
      },
    ]
  },
  {
    path: 'mensaje-final',
    loadChildren: () => import('./modules/mensaje-final/mensaje-final.module').then(m => m.MensajeFinalModule)
  },
  {
    path: 'pedidos-salientes',
    loadChildren: () => import('./modules/pedidos-salientes/pedidos-salientes.module').then(m => m.PedidosSalientesModule)
  },
  {
    path: 'comanda',
    loadChildren: () => import('./modules/comanda/comanda.module').then(m => m.ComandaModule)
  },
  {
    path: 'cancelar-compra',
    loadChildren: () => import('./modules/cancelar-compra/cancelar-compra.module').then(m => m.CancelarCompraModule)
  },
  { path: '**', redirectTo: '', pathMatch: 'full' },
];

@NgModule({
  imports: [RouterModule.forRoot(routes, { useHash: true })],
  exports: [RouterModule]
})
export class AppRoutingModule { }