Commit fdf547f44880e5cbd1fa9976d2279e4599202827

Authored by Marcelo Puebla
1 parent ab78443c93
Exists in master and in 1 other branch validar_pve

Agregada funcion para regresar a la pagina previa.

src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
... ... @@ -85,7 +85,7 @@
85 85 <button
86 86 type="button"
87 87 class="btn btn-block btn-light shadow btn-sm shadow"
88   - [routerLink]="['/inicio']">
  88 + (click)="volverPreviousPage()">
89 89 <span class="pr-2">Volver</span>
90 90 <i class="fa fa-undo text-warning"></i>
91 91 </button>
src/app/components/confirmacion-carrito/confirmacion-carrito.component.ts
1 1 import { Component, OnInit } from '@angular/core';
2 2 import { appSettings } from 'src/etc/AppSettings';
  3 +import { Location } from '@angular/common';
3 4  
4 5 @Component({
5 6 selector: 'app-confirmacion-carrito',
... ... @@ -11,9 +12,13 @@ export class ConfirmacionCarritoComponent implements OnInit {
11 12 productos = [{}, {}, {}];
12 13 private apiUrl: string = appSettings.apiUrl;
13 14  
14   - constructor() { }
  15 + constructor(private location: Location) { }
15 16  
16 17 ngOnInit() {
17 18 }
18 19  
  20 + volverPreviousPage() {
  21 + this.location.back();
  22 + }
  23 +
19 24 }