Commit 2c2acf99d0c1521e7a4be38364a70317dc103188

Authored by Luis Suarez
1 parent 0e3940a251
Exists in develop

quitar TimeOut en pantalla mensaje-final

src/app/modules/mensaje-final/mensaje-final.component.ts
1   -import { Component, OnInit } from '@angular/core';
2   -import { ArticuloService } from 'src/app/services/articulo/articulo.service';
3   -import { Router } from '@angular/router';
  1 +import { Component, OnInit } from "@angular/core";
  2 +import { ArticuloService } from "src/app/services/articulo/articulo.service";
  3 +import { Router } from "@angular/router";
4 4  
5 5 @Component({
6   - selector: 'app-mensaje-final',
7   - templateUrl: './mensaje-final.component.html',
8   - styleUrls: ['./mensaje-final.component.scss']
  6 + selector: "app-mensaje-final",
  7 + templateUrl: "./mensaje-final.component.html",
  8 + styleUrls: ["./mensaje-final.component.scss"]
9 9 })
10 10 export class MensajeFinalComponent implements OnInit {
11 11 timer: any;
12 12  
13 13 constructor(
14 14 public articuloService: ArticuloService,
15   - private router: Router,
16   - ) { }
  15 + private router: Router
  16 + ) {}
17 17  
18 18 ngOnInit() {
19   - this.timer = setTimeout(() => {
20   - this.goToSplash();
21   - }, 15000);
22 19 this.mediaPantalla();
23 20 }
24 21  
25   - OnDestroy() {
26   - clearTimeout(this.timer);
27   - }
  22 + OnDestroy() {}
28 23  
29 24 goToSplash() {
30 25 this.articuloService.cleanShoppingCar();
31   - this.router.navigate(['']);
  26 + this.router.navigate([""]);
32 27 }
33 28  
34 29 mediaPantalla() {
35   - if ($('body').hasClass('media-pantalla')) {
36   - $('body').removeClass('media-pantalla');
  30 + if ($("body").hasClass("media-pantalla")) {
  31 + $("body").removeClass("media-pantalla");
37 32 }
38 33 }
39 34 }