Commit e3aa81f000177e7428e62327efce409a67bf47f0

Authored by Eric Fernandez
1 parent d3c8406c74
Exists in master

prev

src/app/app-routing.module.ts
... ... @@ -3,11 +3,13 @@ import { Routes, RouterModule } from '@angular/router';
3 3 import { HomeComponent } from './components/home/home.component';
4 4 import { InicioComponent } from './components/inicio/inicio.component';
5 5 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component';
  6 +import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component';
6 7  
7 8 const routes: Routes = [
8 9 { path: 'home', component: HomeComponent },
9 10 { path: 'inicio', component: InicioComponent },
10 11 { path: 'busqueda-productos', component: BusquedaProductosComponent },
  12 + { path: 'confirmacion-carrito', component: ConfirmacionCarritoComponent },
11 13 { path: '**', redirectTo: '/home', pathMatch: 'full' },
12 14 ];
13 15  
... ... @@ -15,4 +17,5 @@ const routes: Routes = [
15 17 imports: [RouterModule.forRoot(routes)],
16 18 exports: [RouterModule]
17 19 })
  20 +
18 21 export class AppRoutingModule { }
src/app/app.module.ts
... ... @@ -13,6 +13,7 @@ import { CarouselComponent } from './components/carousel/carousel.component';
13 13 import { HomeComponent } from './components/home/home.component';
14 14 import { InicioComponent } from './components/inicio/inicio.component';
15 15 import { BusquedaProductosComponent } from './components/busqueda-productos/busqueda-productos.component';
  16 +import { ConfirmacionCarritoComponent } from './components/confirmacion-carrito/confirmacion-carrito.component';
16 17 //#endregion
17 18  
18 19 @NgModule({
... ... @@ -23,7 +24,8 @@ import { BusquedaProductosComponent } from './components/busqueda-productos/busq
23 24 CarouselComponent,
24 25 HomeComponent,
25 26 InicioComponent,
26   - BusquedaProductosComponent
  27 + BusquedaProductosComponent,
  28 + ConfirmacionCarritoComponent
27 29 ],
28 30 imports: [
29 31 BrowserModule,
src/app/components/inicio/inicio.component.html
... ... @@ -91,4 +91,4 @@
91 91  
92 92 <!-- SIDEBAR -->
93 93 <app-sidebar class="col-3 col-md-2 vh-100 bg-dark text-white"></app-sidebar>
94   -</div>
95 94 \ No newline at end of file
  95 +</div>
src/app/components/sidebar/sidebar.component.html
... ... @@ -36,7 +36,7 @@
36 36 <h3 class="text-dark"><strong>{{total | currency}}</strong></h3>
37 37 </div>
38 38 <div class="col 12 p-0">
39   - <button type="button" class="btn btn-light shadow mb-2"><strong>Finalizar y pagar</strong></button>
  39 + <button type="button" class="btn btn-light shadow mb-2" routerLink="/confirmacion-carrito"><strong>Finalizar y pagar</strong></button>
40 40 <button type="button" class="btn btn-light shadow btn-sm" (click)="clearCar()">Cancelar</button>
41 41 </div>
42 42 </div>