Commit e738f95d6caae2c34922dd33613c251779687fd9
1 parent
144490ed54
Exists in
develop
Fix
En mesaje final
Showing
1 changed file
with
10 additions
and
3 deletions
Show diff stats
src/app/modules/mensaje-final/mensaje-final.component.ts
| 1 | + | |
| 2 | + | |
| 1 | 3 | import { Component, OnInit } from '@angular/core'; |
| 2 | 4 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; |
| 3 | 5 | import { Router } from '@angular/router'; |
| ... | ... | @@ -12,14 +14,19 @@ export class MensajeFinalComponent implements OnInit { |
| 12 | 14 | |
| 13 | 15 | constructor( |
| 14 | 16 | public articuloService: ArticuloService, |
| 15 | - private router: Router | |
| 16 | - ) {} | |
| 17 | + private router: Router, | |
| 18 | + ) { } | |
| 17 | 19 | |
| 18 | 20 | ngOnInit() { |
| 21 | + this.timer = setTimeout(() => { | |
| 22 | + this.goToSplash(); | |
| 23 | + }, 90000); | |
| 19 | 24 | this.mediaPantalla(); |
| 20 | 25 | } |
| 21 | 26 | |
| 22 | - OnDestroy() {} | |
| 27 | + OnDestroy() { | |
| 28 | + clearTimeout(this.timer); | |
| 29 | + } | |
| 23 | 30 | |
| 24 | 31 | goToSplash() { |
| 25 | 32 | this.articuloService.cleanShoppingCar(); |