Commit 2c99cfa4ca5099e8e81d93e108c6b30de7f15e5e
1 parent
8467eb3d10
Exists in
master
Agregados fnciones
Showing
1 changed file
with
11 additions
and
2 deletions
Show diff stats
src/app/sidebar/sidebar.component.ts
... | ... | @@ -59,6 +59,7 @@ export class SidebarComponent implements OnInit { |
59 | 59 | return i.cantidad; |
60 | 60 | } |
61 | 61 | } |
62 | + | |
62 | 63 | // if (this.cont === this.max) { |
63 | 64 | // this.cont; |
64 | 65 | // return this.cont; |
... | ... | @@ -67,7 +68,15 @@ export class SidebarComponent implements OnInit { |
67 | 68 | // return this.cont; |
68 | 69 | // } |
69 | 70 | |
70 | - } | |
71 | + } | |
72 | + aumentarContador2(index){ | |
73 | + for (let i = 0; i < this.productos.length; i++) | |
74 | + if (i === index) { | |
75 | + for (const pr of this.productos) { | |
76 | + | |
77 | + } | |
78 | + } | |
79 | + } | |
71 | 80 | |
72 | 81 | decrementarContador(){ |
73 | 82 | if (this.cont === this.min) { |
... | ... | @@ -86,5 +95,5 @@ export class SidebarComponent implements OnInit { |
86 | 95 | return this.productos ; |
87 | 96 | } |
88 | 97 | |
89 | - } | |
98 | + } | |
90 | 99 | } |