Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <ul *ngIf="placeholder[0]">
  2. <li *ngFor="let time of placeholder[0], let i = index" >
  3. <div><span id="timer0{{i}}"> lol </span><span *ngIf="timer[0].timeLeft[i] > 0"> : {{timer[0].timeLeft[i]}} secondi <button (click)="restart(0, i)"> reset qua</button><button (click)="check()"> check div</button></span></div>
  4. </li>
  5. </ul>
  6.  
  7. setTime(i: number){
  8. //setting del timer (azzero tutti i campi)
  9. this.placeholder[i]=[]
  10.  
  11. this.timer[i].lunghezza = Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]]).length;
  12.  
  13. for (let j = 0; j < this.timer[i].lunghezza; j++) {
  14. this.placeholder[i][j] = [""]
  15. }
  16.  
  17. for (let j = 0; j < this.timer[i].lunghezza; j++) {
  18. this.pauseTimer(i, j);
  19.  
  20. this.timer[i].inizio[j] = 0;
  21. this.timer[i].fine[j] = Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]][j]).length;
  22. this.timer[i].timeLeft[j] = <number> <unknown>Object.keys(this.datiX.fileJson.ricette[this.datiX.postazioniNome[this.datiX.defPostazione]][this.datiX.ricetta[i]][j][0])[this.timer[i].inizio[j]];
  23. }
  24.  
  25. console.log("check: ",document.getElementById('timer01'))
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement