Commit 82b65698787b08faf13ae8fbfc48729fa2f87cc1
1 parent
74fceda6d6
Exists in
master
Borrada variable.
Showing
1 changed file
with
7 additions
and
7 deletions
Show diff stats
src/app/components/comanda/comanda.component.ts
... | ... | @@ -11,7 +11,6 @@ import * as _ from 'lodash'; |
11 | 11 | }) |
12 | 12 | export class ComandaComponent implements OnInit { |
13 | 13 | |
14 | - private apiImagenes = appSettings.apiImagenes; | |
15 | 14 | private comandas: Comanda[] = []; |
16 | 15 | private cicloTime; |
17 | 16 | |
... | ... | @@ -23,7 +22,6 @@ export class ComandaComponent implements OnInit { |
23 | 22 | |
24 | 23 | this.buscar(); |
25 | 24 | this.ciclo(); |
26 | - | |
27 | 25 | } |
28 | 26 | |
29 | 27 | ngOnDestroy() { |
... | ... | @@ -34,18 +32,20 @@ export class ComandaComponent implements OnInit { |
34 | 32 | buscar() { |
35 | 33 | |
36 | 34 | this.comandaService.getAll() |
37 | - .subscribe((res: Comanda[]) => { | |
35 | + .subscribe((res: Comanda[]) => { | |
38 | 36 | |
39 | - if (!_.isEqual(res, this.comandas)) { | |
37 | + if (!_.isEqual(res, this.comandas)) { | |
40 | 38 | |
41 | - this.comandas = res; | |
42 | - } | |
43 | - }, e => console.error(e)) | |
39 | + this.comandas = res; | |
40 | + console.log(this.comandas); | |
41 | + } | |
42 | + }, e => console.error(e)) | |
44 | 43 | } |
45 | 44 | |
46 | 45 | ciclo() { |
47 | 46 | |
48 | 47 | this.cicloTime = setTimeout(() => { |
48 | + | |
49 | 49 | this.buscar(); |
50 | 50 | this.ciclo(); |
51 | 51 | }, 5000); |