Commit 683b075faf94a284863acc176271f803b7c7cf06
1 parent
b3cda1daaf
Exists in
master
and in
1 other branch
Agregada funcion para regresar a la pagina previa.
Showing
2 changed files
with
12 additions
and
4 deletions
Show diff stats
src/app/components/cancelar-compra/cancelar-compra.component.html
... | ... | @@ -14,8 +14,8 @@ |
14 | 14 | </div> |
15 | 15 | </div> |
16 | 16 | |
17 | - <!-- INFO DE BIENVENIDA --> | |
18 | - <div class="row w-100"> | |
17 | + <!-- INFO --> | |
18 | + <div class="row m-0 w-100"> | |
19 | 19 | <div class="col-4 offset-2"> |
20 | 20 | <div class="row h-100"> |
21 | 21 | <div class="col-12 py-4"> |
... | ... | @@ -38,7 +38,10 @@ |
38 | 38 | PerderĂ¡ los datos y<br>productos ya ingresados |
39 | 39 | </p> |
40 | 40 | <div class="d-flex justify-content-center mt-2"> |
41 | - <button type="button" class="btn btn-lg btn-light shadow mr-4"> | |
41 | + <button | |
42 | + type="button" | |
43 | + class="btn btn-lg btn-light shadow mr-4" | |
44 | + (click)="volverPreviousPage()"> | |
42 | 45 | <span class="pr-2">Volver a mi compra</span> |
43 | 46 | <i class="fa fa-undo text-warning"></i> |
44 | 47 | </button> |
src/app/components/cancelar-compra/cancelar-compra.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-cancelar-compra', |
... | ... | @@ -10,9 +11,13 @@ export class CancelarCompraComponent implements OnInit { |
10 | 11 | |
11 | 12 | private apiUrl: string = appSettings.apiUrl; |
12 | 13 | |
13 | - constructor() { } | |
14 | + constructor(private location: Location) { } | |
14 | 15 | |
15 | 16 | ngOnInit() { |
16 | 17 | } |
17 | 18 | |
19 | + volverPreviousPage() { | |
20 | + this.location.back(); | |
21 | + } | |
22 | + | |
18 | 23 | } |