diff --git a/package.json b/package.json index 8629340..f99087f 100644 --- a/package.json +++ b/package.json @@ -6,12 +6,12 @@ "ng": "ng", "start": "ng serve --port 4206 --host 0.0.0.0 --disableHostCheck", "build": "ng build", - "build-prod": "ng build --prod", + "build-prod": "ng build --prod --aot=true --build--optimizer=true", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", "electron": "electron .", - "electron-build": "ng build --prod && electron .", + "electron-build": "ng build --prod --aot=true --build--optimizer=true && electron .", "build-exe": "electron-packager . --platform=win32 --arch=x64 --asar" }, "private": true, diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 9564aa2..23b2729 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,8 +2,6 @@ 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'; -import { FormasPagoModule } from './modules/formas-pago/formas-pago.module'; -import { OpcionPedidoModule } from './modules/opcion-pedido/opcion-pedido.module'; const routes: Routes = [ { path: '', component: SplashScreenComponent }, @@ -11,15 +9,25 @@ const routes: Routes = [ path: '', component: AdminComponent, children: [ - { path: 'formas-pago', loadChildren: () => FormasPagoModule }, - { path: 'opcion-pedido', loadChildren: () => OpcionPedidoModule }, + { + path: 'formas-pago', + loadChildren: () => import('./modules/formas-pago/formas-pago.module').then(m => m.FormasPagoModule) + }, + { + path: 'opcion-pedido', + loadChildren: () => import('./modules/opcion-pedido/opcion-pedido.module').then(m => m.OpcionPedidoModule) + }, + { + path: 'seleccion-productos', + loadChildren: () => import('./modules/seleccion-productos/seleccion-productos.module').then(m => m.SeleccionProductosModule) + }, ] }, { path: '**', redirectTo: '', pathMatch: 'full' }, ]; @NgModule({ - imports: [RouterModule.forRoot(routes)], + imports: [RouterModule.forRoot(routes, { useHash: true })], exports: [RouterModule] }) export class AppRoutingModule { } diff --git a/src/app/modules/opcion-pedido/opcion-pedido.component.html b/src/app/modules/opcion-pedido/opcion-pedido.component.html index 6249117..1f21f07 100644 --- a/src/app/modules/opcion-pedido/opcion-pedido.component.html +++ b/src/app/modules/opcion-pedido/opcion-pedido.component.html @@ -14,7 +14,7 @@
seleccion-productos works!
+CATEGORÍAS
+