mensaje-final.component.ts 773 Bytes
import { Component, OnInit } from "@angular/core";
import { ArticuloService } from "src/app/services/articulo/articulo.service";
import { Router } from "@angular/router";

@Component({
  selector: "app-mensaje-final",
  templateUrl: "./mensaje-final.component.html",
  styleUrls: ["./mensaje-final.component.scss"]
})
export class MensajeFinalComponent implements OnInit {
  timer: any;

  constructor(
    public articuloService: ArticuloService,
    private router: Router
  ) {}

  ngOnInit() {
    this.mediaPantalla();
  }

  OnDestroy() {}

  goToSplash() {
    this.articuloService.cleanShoppingCar();
    this.router.navigate([""]);
  }

  mediaPantalla() {
    if ($("body").hasClass("media-pantalla")) {
      $("body").removeClass("media-pantalla");
    }
  }
}