Commit 6f304ccd82e28ea4eeafd3a6af75edce48a2ad22
1 parent
073d89f810
Exists in
develop
Fix
limpiar carrito en el splash
Showing
1 changed file
with
5 additions
and
1 deletions
 
Show diff stats
src/app/modules/splash-screen/splash-screen.component.ts
| 1 | import { Component, OnInit } from '@angular/core'; | 1 | import { Component, OnInit } from '@angular/core'; | 
| 2 | import { ArticuloService } from 'src/app/services/articulo/articulo.service'; | ||
| 2 | 3 | ||
| 3 | @Component({ | 4 | @Component({ | 
| 4 | selector: 'app-splash-screen', | 5 | selector: 'app-splash-screen', | 
| 5 | templateUrl: './splash-screen.component.html', | 6 | templateUrl: './splash-screen.component.html', | 
| 6 | styleUrls: ['./splash-screen.component.scss'] | 7 | styleUrls: ['./splash-screen.component.scss'] | 
| 7 | }) | 8 | }) | 
| 8 | export class SplashScreenComponent implements OnInit { | 9 | export class SplashScreenComponent implements OnInit { | 
| 9 | timerSplashScreen = 2000; | 10 | timerSplashScreen = 2000; | 
| 10 | showSplashScreen = true; | 11 | showSplashScreen = true; | 
| 11 | textWelcome = 'BIENVENIDO A SPOT!'; | 12 | textWelcome = 'BIENVENIDO A SPOT!'; | 
| 12 | textComoEstas = '¿cómo estás?'; | 13 | textComoEstas = '¿cómo estás?'; | 
| 13 | textInvitamos = 'TE INVITAMOS A HACER'; | 14 | textInvitamos = 'TE INVITAMOS A HACER'; | 
| 14 | textTuPedido = 'tu pedido acá'; | 15 | textTuPedido = 'tu pedido acá'; | 
| 15 | 16 | ||
| 16 | constructor() {} | 17 | constructor( | 
| 18 | private articuloService: ArticuloService, | ||
| 19 | ) { } | ||
| 17 | 20 | ||
| 18 | ngOnInit() { | 21 | ngOnInit() { | 
| 22 | this.articuloService.cleanShoppingCar(); | ||
| 19 | localStorage.clear(); | 23 | localStorage.clear(); | 
| 20 | setTimeout(() => { | 24 | setTimeout(() => { | 
| 21 | this.showSplashScreen = false; | 25 | this.showSplashScreen = false; | 
| 22 | }, this.timerSplashScreen); | 26 | }, this.timerSplashScreen); | 
| 23 | $('body').removeClass('media-pantalla'); | 27 | $('body').removeClass('media-pantalla'); | 
| 24 | } | 28 | } | 
| 25 | } | 29 | } | 
| 26 | 30 |