Commit fdf547f44880e5cbd1fa9976d2279e4599202827
1 parent
ab78443c93
Exists in
master
Agregada funcion para regresar a la pagina previa.
Showing
2 changed files
with
7 additions
and
2 deletions
Show diff stats
src/app/components/confirmacion-carrito/confirmacion-carrito.component.html
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 | } |